package com.samsung.app;

import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.content.DialogInterface.OnDismissListener;
import android.content.DialogInterface.OnKeyListener;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.location.Criteria;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.net.NetworkInfo;
import android.net.NetworkInfo.DetailedState;
import android.net.Uri;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.Process;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.TextView;
import android.widget.Toast;
import com.samsung.app.bean.DSCResolutionBean;
import com.samsungimaging.asphodel.multimedia.FFmpegJNI;
import com.samsungimaging.asphodel.multimedia.FFmpegJNI.Command;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Date;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import org.cybergarage.upnp.Action;
import org.cybergarage.upnp.Argument;
import org.cybergarage.upnp.ArgumentList;
import org.cybergarage.upnp.Device;
import org.cybergarage.upnp.DeviceList;
import org.cybergarage.upnp.UPnPStatus;
import org.cybergarage.upnp.control.ControlResponse;
import org.cybergarage.upnp.xml.ActionData;
import org.cybergarage.xml.Node;

public final class LiveShutter extends Activity
  implements SurfaceHolder.Callback
{
  private static Context Appcontext;
  private static String AvailShots;
  static int Codec_status = 0;
  public static Device DSCdevice;
  private static String FileURL;
  private static String OldAPName;
  private static int OldApState = 0;
  public static final int TABLET_WIFI_AP_STATE_DISABLED = 11;
  public static final int TABLET_WIFI_AP_STATE_ENABLED = 13;
  public static final int TABLET_WIFI_AP_STATE_ENABLING = 12;
  public static final String TAG = "myLog";
  public static final String TAG_INRY = "INRY";
  public static final int WIFI_AP_STATE_DISABLED = 1;
  public static final int WIFI_AP_STATE_DISABLING = 0;
  public static final int WIFI_AP_STATE_ENABLED = 3;
  public static final int WIFI_AP_STATE_ENABLING = 2;
  public static final int WIFI_AP_STATE_FAILED = 4;
  private static int WifiApState;
  private static ImageView af00;
  private static ImageView af01;
  private static ImageView af02;
  private static ImageView af10;
  private static ImageView af11;
  private static ImageView af12;
  private static ImageView af20;
  private static ImageView af21;
  private static ImageView af22;
  public static boolean bClosing;
  private static boolean bConnect;
  static boolean bConnectwaitflag;
  public static boolean bCreateDir;
  static boolean bForshow;
  private static boolean bKeyFlag;
  static Boolean bOldWifiEnablded;
  private static boolean bResumeStart;
  static boolean bShotting;
  private static boolean bVersionFail;
  static boolean bappclose;
  private static boolean bapsett;
  public static int battlevel;
  private static boolean bbackhotspot;
  public static boolean bbuttondisplay;
  private static boolean bclickflag;
  private static Bitmap bgbitmap;
  private static Bitmap bgbitmap1;
  public static Bitmap bmImg;
  private static Runnable bmprunable;
  static boolean bsaveflag;
  static boolean bshutter;
  private static boolean bsurfacedisplay;
  private static boolean bsurfaceflag;
  private static boolean bwificonfigchange;
  public static String cam_rotated_type;
  public static boolean codec_init;
  private static HttpURLConnection conn;
  public static int display_count;
  private static Bitmap displaybmp;
  static int done_count;
  private static Handler exit_play;
  private static ImageButton flash_button;
  public static int frame_cnt;
  private static SurfaceHolder holder;
  static int inputdata_status;
  static InputStream inputstream;
  private static boolean mGeneral;
  static Handler mHandler;
  static double mLatitude;
  static ArrayList<byte[]> mList;
  static double mLongitude;
  public static boolean mNewSetting;
  private static boolean mSH100;
  public static boolean mStartWifiSetting;
  private static boolean m_isFrameRefresh = false;
  static boolean misGPSShot;
  private static MyControlPoint mycontrolpoint;
  static int nCanvasX;
  public static int nCanvasY;
  static int nCheckCount;
  public static int nCutFrame;
  public static int nDisplayFlag;
  public static int nFlashSelect;
  public static int nHolder196;
  public static int nHolder320;
  public static int nHolder533;
  static int nReadCount;
  public static int nShutterDnUp;
  static int nal_flag;
  private static WifiConfiguration netConfig;
  private static int orientation;
  private static int phonecamtype;
  private static ImageButton photosize_button;
  private static ImageView playback_button;
  static Runnable r;
  static int readlen;
  public static int recvFileSize;
  public static int screentype;
  private static ImageButton shutter_button;
  private static Thread threadframe;
  static Thread threadrun;
  private static Thread threadstream;
  private static ImageButton timer_button;
  private static TimerTaskRun timetask;
  private static WifiConfiguration wifiConfig;
  public static WifiManager wifimanager;
  private static ImageButton zoomin_button;
  private static ImageButton zoomout_button;
  private String[] AFData;
  private String[] FlashData;
  private Action GetInfomationAct = null;
  private Action MULTIAFAct = null;
  private Action SetFlashAct = null;
  private Action SetLEDAct = null;
  private Action SetResolutionAct = null;
  private Action ShotAct = null;
  private Action ShotWithGPSAct = null;
  private String StreamURL = "";
  private int ZoomCount = 0;
  private Action ZoomINAct = null;
  private String ZoomInfoDefault;
  private int ZoomInfoMax = 0;
  private Action ZoomOUTAct = null;
  private AlertDialog.Builder ab = null;
  private TextView availshots;
  private boolean bAFFAIL = false;
  private boolean bNetworkGPS = false;
  private boolean bStart = false;
  private boolean bTimeoutOfSaving = false;
  private boolean bTimer = false;
  private FrameLayout back_layout;
  private ImageView battery;
  private int batvalue = 0;
  private boolean bbackflag = false;
  private boolean bbatteryexit = false;
  private boolean bbatterypopupflag = false;
  private boolean bexitflag = false;
  private boolean bfulldisplay = false;
  private boolean bpopupflag = false;
  private boolean bshotrunflag = false;
  private boolean btimercount = false;
  private boolean btoast = false;
  private boolean btoastflag = false;
  private String cameratype = "ssdp:rotationD";
  private long clecktime = 0L;
  private Location currentLocation;
  int input_count = 0;
  int inputdata_status_line_cnt = 0;
  int line_cnt = 0;
  private LocationManager locManager;
  private boolean mChanged = false;
  Handler mConnectorHandler = new Handler()
  {
    public void handleMessage(Message paramMessage)
    {
//      switch (paramMessage.what)
//      {
//      case 1002:
//      default:
//      case 36:
//      case 37:
//      case 1001:
//      case 1003:
//      }
      while (true)
      {
//        return;
        int i = ((Integer)paramMessage.obj).intValue();
        Logger.d("INRY", "Const.MsgId.AP_CHECK_COMPLETED nDectectCount=" + i);
        if (i < 2)
          Const.Config.DUMMY_WIFI_CONNECT_TYPE = 1;
        while (true)
        {
          Logger.d("INRY", "AP Running Mode = " + Const.Config.DUMMY_WIFI_CONNECT_TYPE);
          LiveShutter.this.stopWifiCamChecker();
          LiveShutter.this.startWifiEnabler();
          break;
          Const.Config.DUMMY_WIFI_CONNECT_TYPE = 3;
        }
        Logger.d("INRY", "Const.MsgId.AP_CHECK_FAILED");
        LiveShutter.this.stopWifiCamChecker();
        LiveShutter.this.showDialog(15);
        LiveShutter.this.holderremove();
        LiveShutter.appclose();
        continue;
        LiveShutter.setmHandler(14);
        continue;
        LiveShutter.setmHandler(107);
      }
    }
  };
  public DeviceList mDeviceList;
  Handler mNewHandler = new Handler()
  {
    public void handleMessage(Message paramMessage)
    {
      switch (paramMessage.what)
      {
      default:
      case 35:
      }
      while (true)
      {
        LiveShutter.this.bTimeoutOfSaving = true;
      }
    }
  };
  private boolean mNotice = false;
  private ArrayList<DSCResolutionBean> mResolutionArrayList = new ArrayList();
  private Timer mTimer = null;
  private WifiCamChecker mWifiCamChecker;
  WifiConnector mWifiConnector = null;
  WifiDialog mWifiDialog = null;
  WifiStateChangedReceiverForAppClose mWifiStateChangedReceiverForAppClose = null;
  WifiStateChangedReceiverForSettingClose mWifiStateChangedReceiverForSettingClose = null;
  WifiStateDebuggerReceiver mWifiStateDebuggerReceiver = null;
  private int m_curFrameCount = 0;
  private int m_jiffies = 0;
  private int m_prevFrameCount = 0;
  private ImageView memoryfull;
  private Timer mrunTimer = null;
  private int nAFGap = 0;
  int nAPEnablingCnt = 0;
  int nAPFailedCnt = 0;
  private int nConnectCount = 0;
  int nCurShowDlg = -1;
  public int nFlashData = 1;
  public int nPhotoSizeData = 0;
  public int nPhotoSizeSelect = 0;
  private int nSaveCount = 0;
  private int nTimeCount = -1;
  public int nTimerData = 0;
  public int nTimerSelect = 0;
  private int nWaitCount = 0;
  private int nZoomGap = 0;
  int nZoomWidth = 0;
  int nZoomland = 0;
  int nZoomport = 0;
  private int nconnectcount = 0;
  private CheckBox noticecheck;
  private ProgressDialog pro = null;
  private ProgressDialog proap = null;
  private DialogInterface.OnCancelListener progDiaCancelListener = new DialogInterface.OnCancelListener()
  {
    public void onCancel(DialogInterface paramDialogInterface)
    {
      LiveShutter.this.showDialog(15);
      LiveShutter.this.holderremove();
      LiveShutter.appclose();
    }
  };
  private long shotcanceltime = 0L;
  private ProgressDialog streampro = null;
  private SurfaceView surfaceview;
  private TextView textmemory;
  private ImageView thumbnail;
  private ImageView timecount;
  private TimerRun timerun;
  private Toast toast = null;
  private int totalproaprun = 0;
  private int totalrunmycontrol = 0;
  private Handler upnp_connect = new Handler();
  private boolean waitconnectdialog = false;
  WifiStateChangedReceiver wifiStateChangedReceiver = new WifiStateChangedReceiver();
  private ImageView zoom_indicator;
  private long zoomtime = 0L;

  static
  {
    bCreateDir = false;
    wifimanager = null;
    wifiConfig = null;
    bapsett = false;
    OldAPName = "";
    DSCdevice = null;
    FileURL = "";
    bConnect = false;
    bmImg = null;
    battlevel = -1;
    recvFileSize = 0;
    bgbitmap = null;
    bgbitmap1 = null;
    holder = null;
    nDisplayFlag = 0;
    nFlashSelect = 1;
    mHandler = new Handler();
    AvailShots = "";
    nCheckCount = 0;
    nReadCount = 0;
    bsurfacedisplay = true;
    bbuttondisplay = false;
    bsurfaceflag = false;
    bConnectwaitflag = false;
    bKeyFlag = false;
    bwificonfigchange = false;
    bappclose = false;
    bsaveflag = false;
    bshutter = false;
    bbackhotspot = false;
    mGeneral = false;
    mSH100 = false;
    bclickflag = false;
    mStartWifiSetting = false;
    mNewSetting = false;
    screentype = 1;
    netConfig = null;
    mycontrolpoint = null;
    inputstream = null;
    conn = null;
    exit_play = new Handler();
    bmprunable = null;
    threadrun = null;
    threadstream = null;
    threadframe = null;
    display_count = 0;
    readlen = 0;
    Codec_status = 0;
    nal_flag = 0;
    codec_init = false;
    frame_cnt = 0;
    bClosing = false;
    bForshow = false;
    nCutFrame = 10;
    bVersionFail = false;
    bResumeStart = false;
    nShutterDnUp = -1;
    nHolder533 = 0;
    nHolder320 = 0;
    nHolder196 = 0;
    nCanvasY = 0;
    nCanvasX = 0;
    bOldWifiEnablded = Boolean.valueOf(false);
    inputdata_status = 0;
    bShotting = false;
    mList = new ArrayList();
    mLatitude = 0.0D;
    mLongitude = 0.0D;
    misGPSShot = false;
  }

  private void CheckVersion()
  {
    DisplayMetrics localDisplayMetrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
    int i = localDisplayMetrics.widthPixels;
    int j = localDisplayMetrics.heightPixels;
    int k = (int)(0.5F + i / localDisplayMetrics.density);
    int m = (int)(0.5F + j / localDisplayMetrics.density);
    Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "Width : " + String.valueOf(i));
    Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "Height : " + String.valueOf(j));
    Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "displayMetrics.density : " + String.valueOf(localDisplayMetrics.density));
    Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "displayMetrics.widthDips : " + String.valueOf(k));
    Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "displayMetrics.heightDips : " + String.valueOf(m));
    String str = Build.MANUFACTURER.toLowerCase();
    if (2 == getResources().getConfiguration().orientation)
    {
      if ((k >= 533) && (m >= 320) && ("samsung".equals(str)))
        break label559;
      bVersionFail = true;
      showDialog(8);
    }
    while (true)
    {
      return;
      if ((k < 320) || (m < 533) || (!"samsung".equals(str)))
      {
        bVersionFail = true;
        showDialog(8);
        continue;
      }
      label559: if (Integer.parseInt(Build.VERSION.SDK) >= 8)
      {
        bVersionFail = false;
        if (!mSH100)
          continue;
        setHotspot();
        continue;
      }
      bVersionFail = true;
      showDialog(8);
    }
  }

  private static String CreatFileName()
  {
    String str = new SimpleDateFormat("yyyy-MM-dd HH.mm.ss").format(new Date());
    return Utils.getDefaultStorage() + "/" + str + ".jpg";
  }

  private void CreateDir()
  {
    File localFile = new File(Utils.getDefaultStorage());
    if (!localFile.isDirectory())
      if (localFile.mkdirs())
        bCreateDir = true;
    while (true)
    {
      return;
      bCreateDir = false;
      continue;
      bCreateDir = true;
    }
  }

  private void Createchanged()
  {
    setContentView(2130903042);
    SetLayout();
    this.surfaceview = ((SurfaceView)findViewById(2131099652));
    this.surfaceview.setOnClickListener(new ShowListener(this.surfaceview));
    holderremove();
    holder = this.surfaceview.getHolder();
    holder.addCallback(this);
  }

  private void DoCheckAPMode()
  {
    this.mChanged = true;
    Logger.d("myLog", "!!!!SH100 is ready!!!!");
    if (!this.bStart)
    {
      this.batvalue = registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED")).getIntExtra("level", -1);
      if (Utils.isSCHi909())
        this.batvalue /= 10;
      Createchanged();
      if (this.batvalue > 7)
        break label101;
      this.bbatteryexit = true;
      this.bbatterypopupflag = true;
      showDialog(2);
      Logger.d("INRY", "battery is empty..");
    }
    while (true)
    {
      return;
      label101: CheckVersion();
      CreateDir();
      MyPhoneStateListener localMyPhoneStateListener = new MyPhoneStateListener();
      ((TelephonyManager)getSystemService("phone")).listen(localMyPhoneStateListener, 32);
      if (!mSH100)
      {
        startWifiEnabler();
        mStartWifiSetting = true;
      }
      if (this.batvalue <= 7)
        continue;
      timetask = new TimerTaskRun();
      this.mTimer = new Timer();
      this.mTimer.schedule(timetask, 0L, 1000L);
    }
  }

  // ERROR //
  private static InputStream GetImage(String paramString)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_1
    //   2: new 1044	java/net/URL
    //   5: dup
    //   6: aload_0
    //   7: invokespecial 1045	java/net/URL:<init>	(Ljava/lang/String;)V
    //   10: astore_2
    //   11: aload_2
    //   12: invokevirtual 1049	java/net/URL:openConnection	()Ljava/net/URLConnection;
    //   15: checkcast 1051	java/net/HttpURLConnection
    //   18: astore 6
    //   20: aload 6
    //   22: ifnonnull +9 -> 31
    //   25: aconst_null
    //   26: astore 5
    //   28: goto +65 -> 93
    //   31: aload 6
    //   33: iconst_1
    //   34: invokevirtual 1055	java/net/HttpURLConnection:setDoInput	(Z)V
    //   37: aload 6
    //   39: invokevirtual 1058	java/net/HttpURLConnection:connect	()V
    //   42: aload 6
    //   44: invokevirtual 1061	java/net/HttpURLConnection:getContentLength	()I
    //   47: putstatic 472	com/samsung/app/LiveShutter:recvFileSize	I
    //   50: getstatic 472	com/samsung/app/LiveShutter:recvFileSize	I
    //   53: ifle +13 -> 66
    //   56: aload 6
    //   58: invokevirtual 1065	java/net/HttpURLConnection:getInputStream	()Ljava/io/InputStream;
    //   61: astore 7
    //   63: aload 7
    //   65: astore_1
    //   66: aload_1
    //   67: astore 5
    //   69: goto +24 -> 93
    //   72: astore 8
    //   74: aload 8
    //   76: astore 4
    //   78: aload 4
    //   80: invokevirtual 1068	java/io/IOException:printStackTrace	()V
    //   83: goto -17 -> 66
    //   86: astore_3
    //   87: aload_3
    //   88: astore 4
    //   90: goto -12 -> 78
    //   93: aload 5
    //   95: areturn
    //
    // Exception table:
    //   from	to	target	type
    //   2	11	72	java/io/IOException
    //   11	63	86	java/io/IOException
  }

  private boolean GetInfoValue(Node paramNode)
  {
    int i = 0;
    Node localNode1;
    int m;
    for (int j = 0; ; j++)
    {
      int k = paramNode.getNNodes();
      if (j >= k)
        return i;
      localNode1 = paramNode.getNode(j);
      m = 0;
      int n = localNode1.getNNodes();
      if (m < n)
        break;
    }
    Node localNode2 = localNode1.getNode(m);
    int i1;
    if (localNode2.getName().equals("GETINFORMATIONRESULT"))
    {
      i = 1;
      i1 = 0;
      int i2 = localNode2.getNNodes();
      if (i1 < i2);
    }
    while (true)
    {
      m++;
      break;
      Node localNode3 = localNode2.getNode(i1);
      int i7;
      if (localNode3.getName().equals("Resolutions"))
      {
        Logger.d("INRY", "GetInfoValue 1");
        this.mResolutionArrayList.clear();
        Logger.d("INRY", "GetInfoValue 2");
        i7 = 0;
        label145: int i8 = localNode3.getNNodes();
        if (i7 >= i8)
        {
          Logger.d("INRY", "GetInfoValue 3");
          32 local32 = new Runnable()
          {
            public void run()
            {
              Logger.d("INRY", "GetInfoValue 4 nPhotoSizeData=" + LiveShutter.this.nPhotoSizeData);
              LiveShutter.this.displayResolutionButton(LiveShutter.this.nPhotoSizeData);
            }
          };
          runOnUiThread(local32);
        }
      }
      while (true)
      {
        i1++;
        break;
        Node localNode6 = localNode3.getNode(i7);
        DSCResolutionBean localDSCResolutionBean;
        int i9;
        if (localNode6 != null)
        {
          localDSCResolutionBean = new DSCResolutionBean();
          i9 = 0;
          int i10 = localNode6.getNNodes();
          if (i9 >= i10)
          {
            this.mResolutionArrayList.add(localDSCResolutionBean);
            Logger.d("INRY", "mResolutionArrayList.add w=" + localDSCResolutionBean.getWidth() + ", h=" + localDSCResolutionBean.getHeight());
          }
        }
        else
        {
          i7++;
          break label145;
        }
        Node localNode7 = localNode6.getNode(i9);
        if (localNode7.getName().equals("Width"))
          localDSCResolutionBean.setWidth(Integer.parseInt(localNode7.getValue()));
        while (true)
        {
          i9++;
          break;
          if (!localNode7.getName().equals("Height"))
            continue;
          localDSCResolutionBean.setHeight(Integer.parseInt(localNode7.getValue()));
        }
        if (localNode3.getName().equals("Flash"))
        {
          this.FlashData = new String[localNode3.getNNodes()];
          for (int i5 = 0; ; i5++)
          {
            int i6 = localNode3.getNNodes();
            if (i5 >= i6)
              break;
            Node localNode5 = localNode3.getNode(i5);
            this.FlashData[i5] = localNode5.getValue();
          }
        }
        if (localNode3.getName().equals("ZoomInfo"))
        {
          int i3 = 0;
          int i4 = localNode3.getNNodes();
          if (i3 >= i4)
            continue;
          Node localNode4 = localNode3.getNode(i3);
          if (localNode4.getName().equals("DefaultZoom"))
            this.ZoomInfoDefault = localNode4.getValue();
          while (true)
          {
            i3++;
            break;
            if (!localNode4.getName().equals("MaxZoom"))
              continue;
            this.ZoomInfoMax = Integer.parseInt(localNode4.getValue());
          }
        }
        if (localNode3.getName().equals("AVAILSHOTS"))
        {
          AvailShots = localNode3.getValue();
          continue;
        }
        if (!localNode3.getName().equals("ROTATION"))
          continue;
        switch (Integer.parseInt(localNode3.getValue()))
        {
        case 2:
        case 4:
        case 5:
        case 7:
        default:
          break;
        case 1:
          this.cameratype = "ssdp:rotationD";
          break;
        case 6:
          this.cameratype = "ssdp:rotationR";
          break;
        case 3:
          this.cameratype = "ssdp:rotationU";
          break;
        case 8:
          this.cameratype = "ssdp:rotationL";
        }
      }
      if (!localNode2.getName().equals("GETIPRESULT"))
        continue;
      this.StreamURL = localNode2.getValue();
      GetLiveStream();
    }
  }

  private void GetLiveStream()
  {
    if (threadstream == null)
    {
      inputstream = null;
      new Thread(new Runnable()
      {
        public void run()
        {
          LiveShutter.nCheckCount = 0;
          LiveShutter.bshutter = false;
          LiveShutter.nDisplayFlag = 48;
          LiveShutter.mHandler.post(LiveShutter.r);
        }
      }).start();
    }
  }

  private void GetThumbnail()
  {
    this.bfulldisplay = true;
    if (FileURL.equals(""))
    {
      shutterbutton(true);
      if ((AvailShots.equals("0")) || (AvailShots.equals("-1")))
        this.bexitflag = true;
      Logger.d("myLog", "GetThumbnail() FileURL is Empty ++");
      nDisplayFlag = 8;
      mHandler.post(r);
    }
    while (true)
    {
      return;
      nDisplayFlag = 43;
      mHandler.post(r);
    }
  }

  public static void NDKRelease()
  {
    if (!codec_init);
    while (true)
    {
      return;
      nal_flag = 0;
      Codec_status = 0;
      codec_init = false;
      display_count = 0;
      bKeyFlag = false;
      nCutFrame = 10;
      if (bClosing)
      {
        FFmpegJNI.request(FFmpegJNI.Command.VIDEO_STREAMING_QUIT, "ffplay quit");
        continue;
      }
      FileURL = "";
      m_isFrameRefresh = false;
    }
  }

  // ERROR //
  public static boolean SaveImageVGA()
  {
    // Byte code:
    //   0: invokestatic 1203	com/samsung/app/LiveShutter:CreatFileName	()Ljava/lang/String;
    //   3: astore_0
    //   4: new 1205	java/io/FileOutputStream
    //   7: dup
    //   8: aload_0
    //   9: invokespecial 1206	java/io/FileOutputStream:<init>	(Ljava/lang/String;)V
    //   12: astore_1
    //   13: getstatic 468	com/samsung/app/LiveShutter:bmImg	Landroid/graphics/Bitmap;
    //   16: getstatic 1212	android/graphics/Bitmap$CompressFormat:JPEG	Landroid/graphics/Bitmap$CompressFormat;
    //   19: bipush 100
    //   21: aload_1
    //   22: invokevirtual 1218	android/graphics/Bitmap:compress	(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
    //   25: pop
    //   26: aload_1
    //   27: invokevirtual 1221	java/io/FileOutputStream:close	()V
    //   30: getstatic 602	com/samsung/app/LiveShutter:misGPSShot	Z
    //   33: ifeq +126 -> 159
    //   36: new 1223	android/media/ExifInterface
    //   39: dup
    //   40: aload_0
    //   41: invokespecial 1224	android/media/ExifInterface:<init>	(Ljava/lang/String;)V
    //   44: astore 10
    //   46: aload 10
    //   48: ldc_w 1226
    //   51: new 802	java/lang/StringBuilder
    //   54: dup
    //   55: invokespecial 1227	java/lang/StringBuilder:<init>	()V
    //   58: getstatic 598	com/samsung/app/LiveShutter:mLatitude	D
    //   61: invokestatic 1231	com/samsung/app/LiveShutter:deg_to_dms	(D)Ljava/lang/String;
    //   64: invokevirtual 829	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   67: invokevirtual 843	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   70: invokevirtual 1234	android/media/ExifInterface:setAttribute	(Ljava/lang/String;Ljava/lang/String;)V
    //   73: aload 10
    //   75: ldc_w 1236
    //   78: ldc_w 1238
    //   81: invokevirtual 1234	android/media/ExifInterface:setAttribute	(Ljava/lang/String;Ljava/lang/String;)V
    //   84: aload 10
    //   86: ldc_w 1240
    //   89: new 802	java/lang/StringBuilder
    //   92: dup
    //   93: invokespecial 1227	java/lang/StringBuilder:<init>	()V
    //   96: getstatic 600	com/samsung/app/LiveShutter:mLongitude	D
    //   99: invokestatic 1231	com/samsung/app/LiveShutter:deg_to_dms	(D)Ljava/lang/String;
    //   102: invokevirtual 829	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   105: invokevirtual 843	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   108: invokevirtual 1234	android/media/ExifInterface:setAttribute	(Ljava/lang/String;Ljava/lang/String;)V
    //   111: aload 10
    //   113: ldc_w 1242
    //   116: ldc_w 1244
    //   119: invokevirtual 1234	android/media/ExifInterface:setAttribute	(Ljava/lang/String;Ljava/lang/String;)V
    //   122: iconst_1
    //   123: anewarray 1246	java/lang/Object
    //   126: astore 11
    //   128: aload 11
    //   130: iconst_0
    //   131: getstatic 482	com/samsung/app/LiveShutter:nFlashSelect	I
    //   134: invokestatic 1249	java/lang/Integer:valueOf	(I)Ljava/lang/Integer;
    //   137: aastore
    //   138: aload 10
    //   140: ldc_w 1134
    //   143: ldc_w 1251
    //   146: aload 11
    //   148: invokestatic 1254	java/lang/String:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   151: invokevirtual 1234	android/media/ExifInterface:setAttribute	(Ljava/lang/String;Ljava/lang/String;)V
    //   154: aload 10
    //   156: invokevirtual 1257	android/media/ExifInterface:saveAttributes	()V
    //   159: iconst_1
    //   160: putstatic 511	com/samsung/app/LiveShutter:bsaveflag	Z
    //   163: iconst_1
    //   164: istore 5
    //   166: iload 5
    //   168: ireturn
    //   169: astore 13
    //   171: aload 13
    //   173: astore_3
    //   174: aload_3
    //   175: invokevirtual 1258	java/io/FileNotFoundException:printStackTrace	()V
    //   178: iconst_5
    //   179: putstatic 480	com/samsung/app/LiveShutter:nDisplayFlag	I
    //   182: getstatic 489	com/samsung/app/LiveShutter:mHandler	Landroid/os/Handler;
    //   185: getstatic 1179	com/samsung/app/LiveShutter:r	Ljava/lang/Runnable;
    //   188: ldc2_w 1259
    //   191: invokevirtual 1264	android/os/Handler:postDelayed	(Ljava/lang/Runnable;J)Z
    //   194: pop
    //   195: iconst_0
    //   196: istore 5
    //   198: goto -32 -> 166
    //   201: astore 12
    //   203: aload 12
    //   205: astore 7
    //   207: aload 7
    //   209: invokevirtual 1068	java/io/IOException:printStackTrace	()V
    //   212: iconst_5
    //   213: putstatic 480	com/samsung/app/LiveShutter:nDisplayFlag	I
    //   216: getstatic 489	com/samsung/app/LiveShutter:mHandler	Landroid/os/Handler;
    //   219: getstatic 1179	com/samsung/app/LiveShutter:r	Ljava/lang/Runnable;
    //   222: ldc2_w 1259
    //   225: invokevirtual 1264	android/os/Handler:postDelayed	(Ljava/lang/Runnable;J)Z
    //   228: pop
    //   229: iconst_0
    //   230: istore 5
    //   232: goto -66 -> 166
    //   235: astore 6
    //   237: aload 6
    //   239: astore 7
    //   241: goto -34 -> 207
    //   244: astore_2
    //   245: aload_2
    //   246: astore_3
    //   247: goto -73 -> 174
    //
    // Exception table:
    //   from	to	target	type
    //   4	13	169	java/io/FileNotFoundException
    //   4	13	201	java/io/IOException
    //   13	163	235	java/io/IOException
    //   13	163	244	java/io/FileNotFoundException
  }

  private void SetResolutionValue(Node paramNode)
  {
    int i = 0;
    if (i >= paramNode.getNNodes())
      return;
    Node localNode1 = paramNode.getNode(i);
    for (int j = 0; ; j++)
    {
      if (j >= localNode1.getNNodes())
      {
        i++;
        break;
      }
      Node localNode2 = localNode1.getNode(j);
      if (!localNode2.getName().equals("AVAILSHOTS"))
        continue;
      AvailShots = localNode2.getValue();
      nDisplayFlag = 8;
      mHandler.post(r);
    }
  }

  private void ShotValue(Node paramNode)
  {
    Node localNode1;
    int j;
    for (int i = 0; ; i++)
    {
      if (i >= paramNode.getNNodes())
        return;
      localNode1 = paramNode.getNode(i);
      j = 0;
      if (j < localNode1.getNNodes())
        break;
    }
    Node localNode2 = localNode1.getNode(j);
    if (localNode2.getName().equals("AFSHOTRESULT"))
      FileURL = localNode2.getValue();
    while (true)
    {
      this.bshotrunflag = false;
      j++;
      break;
      if (!localNode2.getName().equals("AVAILSHOTS"))
        continue;
      AvailShots = localNode2.getValue();
    }
  }

  private void Thumbnaildown()
  {
    String str = FileURL + "_SM";
    Logger.d("myLog", "GetThumbnail: strURL : " + str);
    bmImg = null;
    playback_button.setVisibility(8);
    this.thumbnail.setVisibility(8);
    this.back_layout.setVisibility(8);
    InputStream localInputStream = GetImage(str);
    if (localInputStream == null)
    {
      Logger.d("myLog", "GetThumbnail: InputStream is NULL ++");
      availshotsdisplay();
      shutterbutton(true);
    }
    while (true)
    {
      return;
      bmImg = BitmapFactory.decodeStream(localInputStream);
      try
      {
        localInputStream.close();
        if (bmImg != null)
        {
          nDisplayFlag = 2;
          mHandler.postDelayed(r, 10L);
        }
        availshotsdisplay();
        shutterbutton(true);
        Logger.d("myLog", "GetThumbnail: END");
      }
      catch (IOException localIOException)
      {
        while (true)
          localIOException.printStackTrace();
      }
    }
  }

  private void afdisplay()
  {
    if (!this.bshotrunflag);
    int i2;
    int i3;
    label55: 
    do
    {
      do
      {
        return;
        switch (phonecamtype)
        {
        default:
          i2 = this.AFData.length;
        case 3:
        case 2:
        case 1:
        case 4:
        }
      }
      while (i2 == 0);
      i3 = 0;
    }
    while (i3 >= i2);
    if (this.AFData[i3].equals("0x0"))
      af00.setVisibility(0);
    while (true)
    {
      i3++;
      break label55;
      if (this.bAFFAIL)
        af11.setImageResource(2130837553);
      while (true)
      {
        int i16 = (int)(533 / 2 - 67.330002F / 2.0F);
        int i17 = (int)(533 / 2 - 67.330002F / 2.0F - 3 - 67.330002F);
        int i18 = (int)(533 / 2 + 67.330002F / 2.0F + 3);
        int i19 = (int)(320 / 2 - 67.330002F / 2.0F);
        int i20 = (int)(320 / 2 - 67.330002F / 2.0F - 3 - 67.330002F);
        int i21 = (int)(320 / 2 + 67.330002F / 2.0F + 3);
        RelativeLayout.LayoutParams localLayoutParams28 = (RelativeLayout.LayoutParams)af00.getLayoutParams();
        localLayoutParams28.leftMargin = convertDipToPx(Appcontext, i17);
        localLayoutParams28.topMargin = convertDipToPx(Appcontext, i20);
        af00.setLayoutParams(localLayoutParams28);
        RelativeLayout.LayoutParams localLayoutParams29 = (RelativeLayout.LayoutParams)af01.getLayoutParams();
        localLayoutParams29.leftMargin = convertDipToPx(Appcontext, i16);
        localLayoutParams29.topMargin = convertDipToPx(Appcontext, i20);
        af01.setLayoutParams(localLayoutParams29);
        RelativeLayout.LayoutParams localLayoutParams30 = (RelativeLayout.LayoutParams)af02.getLayoutParams();
        localLayoutParams30.leftMargin = convertDipToPx(Appcontext, i18);
        localLayoutParams30.topMargin = convertDipToPx(Appcontext, i20);
        af02.setLayoutParams(localLayoutParams30);
        RelativeLayout.LayoutParams localLayoutParams31 = (RelativeLayout.LayoutParams)af10.getLayoutParams();
        localLayoutParams31.leftMargin = convertDipToPx(Appcontext, i17);
        localLayoutParams31.topMargin = convertDipToPx(Appcontext, i19);
        af10.setLayoutParams(localLayoutParams31);
        RelativeLayout.LayoutParams localLayoutParams32 = (RelativeLayout.LayoutParams)af11.getLayoutParams();
        localLayoutParams32.leftMargin = convertDipToPx(Appcontext, i16);
        localLayoutParams32.topMargin = convertDipToPx(Appcontext, i19);
        af11.setLayoutParams(localLayoutParams32);
        RelativeLayout.LayoutParams localLayoutParams33 = (RelativeLayout.LayoutParams)af12.getLayoutParams();
        localLayoutParams33.leftMargin = convertDipToPx(Appcontext, i18);
        localLayoutParams33.topMargin = convertDipToPx(Appcontext, i19);
        af12.setLayoutParams(localLayoutParams33);
        RelativeLayout.LayoutParams localLayoutParams34 = (RelativeLayout.LayoutParams)af20.getLayoutParams();
        localLayoutParams34.leftMargin = convertDipToPx(Appcontext, i17);
        localLayoutParams34.topMargin = convertDipToPx(Appcontext, i21);
        af20.setLayoutParams(localLayoutParams34);
        RelativeLayout.LayoutParams localLayoutParams35 = (RelativeLayout.LayoutParams)af21.getLayoutParams();
        localLayoutParams35.leftMargin = convertDipToPx(Appcontext, i16);
        localLayoutParams35.topMargin = convertDipToPx(Appcontext, i21);
        af21.setLayoutParams(localLayoutParams35);
        RelativeLayout.LayoutParams localLayoutParams36 = (RelativeLayout.LayoutParams)af22.getLayoutParams();
        localLayoutParams36.leftMargin = convertDipToPx(Appcontext, i18);
        localLayoutParams36.topMargin = convertDipToPx(Appcontext, i21);
        af22.setLayoutParams(localLayoutParams36);
        break;
        af00.setImageResource(2130837551);
        af01.setImageResource(2130837551);
        af02.setImageResource(2130837551);
        af10.setImageResource(2130837551);
        af11.setImageResource(2130837551);
        af12.setImageResource(2130837551);
        af20.setImageResource(2130837551);
        af21.setImageResource(2130837551);
        af22.setImageResource(2130837551);
      }
      if (this.bAFFAIL)
        af11.setImageResource(2130837553);
      while (true)
      {
        int i10 = (int)(320 / 2 - 67.330002F / 2.0F);
        int i11 = (int)(320 / 2 - 67.330002F / 2.0F - 3 - 67.330002F);
        int i12 = (int)(320 / 2 + 67.330002F / 2.0F + 3);
        int i13 = (int)(533 / 2 - 67.330002F / 2.0F);
        int i14 = (int)(533 / 2 - 67.330002F / 2.0F - 3 - 67.330002F);
        int i15 = (int)(533 / 2 + 67.330002F / 2.0F + 3);
        RelativeLayout.LayoutParams localLayoutParams19 = (RelativeLayout.LayoutParams)af00.getLayoutParams();
        localLayoutParams19.leftMargin = convertDipToPx(Appcontext, i11);
        localLayoutParams19.topMargin = convertDipToPx(Appcontext, i14);
        af00.setLayoutParams(localLayoutParams19);
        RelativeLayout.LayoutParams localLayoutParams20 = (RelativeLayout.LayoutParams)af01.getLayoutParams();
        localLayoutParams20.leftMargin = convertDipToPx(Appcontext, i10);
        localLayoutParams20.topMargin = convertDipToPx(Appcontext, i14);
        af01.setLayoutParams(localLayoutParams20);
        RelativeLayout.LayoutParams localLayoutParams21 = (RelativeLayout.LayoutParams)af02.getLayoutParams();
        localLayoutParams21.leftMargin = convertDipToPx(Appcontext, i12);
        localLayoutParams21.topMargin = convertDipToPx(Appcontext, i14);
        af02.setLayoutParams(localLayoutParams21);
        RelativeLayout.LayoutParams localLayoutParams22 = (RelativeLayout.LayoutParams)af10.getLayoutParams();
        localLayoutParams22.leftMargin = convertDipToPx(Appcontext, i11);
        localLayoutParams22.topMargin = convertDipToPx(Appcontext, i13);
        af10.setLayoutParams(localLayoutParams22);
        RelativeLayout.LayoutParams localLayoutParams23 = (RelativeLayout.LayoutParams)af11.getLayoutParams();
        localLayoutParams23.leftMargin = convertDipToPx(Appcontext, i10);
        localLayoutParams23.topMargin = convertDipToPx(Appcontext, i13);
        af11.setLayoutParams(localLayoutParams23);
        RelativeLayout.LayoutParams localLayoutParams24 = (RelativeLayout.LayoutParams)af12.getLayoutParams();
        localLayoutParams24.leftMargin = convertDipToPx(Appcontext, i12);
        localLayoutParams24.topMargin = convertDipToPx(Appcontext, i13);
        af12.setLayoutParams(localLayoutParams24);
        RelativeLayout.LayoutParams localLayoutParams25 = (RelativeLayout.LayoutParams)af20.getLayoutParams();
        localLayoutParams25.leftMargin = convertDipToPx(Appcontext, i11);
        localLayoutParams25.topMargin = convertDipToPx(Appcontext, i15);
        af20.setLayoutParams(localLayoutParams25);
        RelativeLayout.LayoutParams localLayoutParams26 = (RelativeLayout.LayoutParams)af21.getLayoutParams();
        localLayoutParams26.leftMargin = convertDipToPx(Appcontext, i10);
        localLayoutParams26.topMargin = convertDipToPx(Appcontext, i15);
        af21.setLayoutParams(localLayoutParams26);
        RelativeLayout.LayoutParams localLayoutParams27 = (RelativeLayout.LayoutParams)af22.getLayoutParams();
        localLayoutParams27.leftMargin = convertDipToPx(Appcontext, i12);
        localLayoutParams27.topMargin = convertDipToPx(Appcontext, i15);
        af22.setLayoutParams(localLayoutParams27);
        break;
        af00.setImageResource(2130837551);
        af01.setImageResource(2130837551);
        af02.setImageResource(2130837551);
        af10.setImageResource(2130837551);
        af11.setImageResource(2130837551);
        af12.setImageResource(2130837551);
        af20.setImageResource(2130837551);
        af21.setImageResource(2130837551);
        af22.setImageResource(2130837551);
      }
      if (this.bAFFAIL)
        af11.setImageResource(2130837554);
      while (true)
      {
        int i4 = (int)(320 / 2 - 50.0F / 2.0F);
        int i5 = (int)(320 / 2 - 50.0F / 2.0F - 3 - 50.0F);
        int i6 = (int)(320 / 2 + 50.0F / 2.0F + 3);
        int i7 = (int)(320 / 2 - 50.0F / 2.0F);
        int i8 = (int)(320 / 2 - 50.0F / 2.0F - 3 - 50.0F);
        int i9 = (int)(320 / 2 + 50.0F / 2.0F + 3);
        RelativeLayout.LayoutParams localLayoutParams10 = (RelativeLayout.LayoutParams)af00.getLayoutParams();
        localLayoutParams10.leftMargin = convertDipToPx(Appcontext, i5);
        localLayoutParams10.topMargin = (convertDipToPx(Appcontext, i8) + nCanvasY);
        af00.setLayoutParams(localLayoutParams10);
        RelativeLayout.LayoutParams localLayoutParams11 = (RelativeLayout.LayoutParams)af01.getLayoutParams();
        localLayoutParams11.leftMargin = convertDipToPx(Appcontext, i4);
        localLayoutParams11.topMargin = (convertDipToPx(Appcontext, i8) + nCanvasY);
        af01.setLayoutParams(localLayoutParams11);
        RelativeLayout.LayoutParams localLayoutParams12 = (RelativeLayout.LayoutParams)af02.getLayoutParams();
        localLayoutParams12.leftMargin = convertDipToPx(Appcontext, i6);
        localLayoutParams12.topMargin = (convertDipToPx(Appcontext, i8) + nCanvasY);
        af02.setLayoutParams(localLayoutParams12);
        RelativeLayout.LayoutParams localLayoutParams13 = (RelativeLayout.LayoutParams)af10.getLayoutParams();
        localLayoutParams13.leftMargin = convertDipToPx(Appcontext, i5);
        localLayoutParams13.topMargin = (convertDipToPx(Appcontext, i7) + nCanvasY);
        af10.setLayoutParams(localLayoutParams13);
        RelativeLayout.LayoutParams localLayoutParams14 = (RelativeLayout.LayoutParams)af11.getLayoutParams();
        localLayoutParams14.leftMargin = convertDipToPx(Appcontext, i4);
        localLayoutParams14.topMargin = (convertDipToPx(Appcontext, i7) + nCanvasY);
        af11.setLayoutParams(localLayoutParams14);
        RelativeLayout.LayoutParams localLayoutParams15 = (RelativeLayout.LayoutParams)af12.getLayoutParams();
        localLayoutParams15.leftMargin = convertDipToPx(Appcontext, i6);
        localLayoutParams15.topMargin = (convertDipToPx(Appcontext, i7) + nCanvasY);
        af12.setLayoutParams(localLayoutParams15);
        RelativeLayout.LayoutParams localLayoutParams16 = (RelativeLayout.LayoutParams)af20.getLayoutParams();
        localLayoutParams16.leftMargin = convertDipToPx(Appcontext, i5);
        localLayoutParams16.topMargin = (convertDipToPx(Appcontext, i9) + nCanvasY);
        af20.setLayoutParams(localLayoutParams16);
        RelativeLayout.LayoutParams localLayoutParams17 = (RelativeLayout.LayoutParams)af21.getLayoutParams();
        localLayoutParams17.leftMargin = convertDipToPx(Appcontext, i4);
        localLayoutParams17.topMargin = (convertDipToPx(Appcontext, i9) + nCanvasY);
        af21.setLayoutParams(localLayoutParams17);
        RelativeLayout.LayoutParams localLayoutParams18 = (RelativeLayout.LayoutParams)af22.getLayoutParams();
        localLayoutParams18.leftMargin = convertDipToPx(Appcontext, i6);
        localLayoutParams18.topMargin = (convertDipToPx(Appcontext, i9) + nCanvasY);
        af22.setLayoutParams(localLayoutParams18);
        break;
        af00.setImageResource(2130837552);
        af01.setImageResource(2130837552);
        af02.setImageResource(2130837552);
        af10.setImageResource(2130837552);
        af11.setImageResource(2130837552);
        af12.setImageResource(2130837552);
        af20.setImageResource(2130837552);
        af21.setImageResource(2130837552);
        af22.setImageResource(2130837552);
      }
      if (this.bAFFAIL)
        af11.setImageResource(2130837554);
      while (true)
      {
        int i = (int)(533 / 2 - 50.0F / 2.0F);
        int j = (int)(533 / 2 - 50.0F / 2.0F - 3 - 50.0F);
        int k = (int)(533 / 2 + 50.0F / 2.0F + 3);
        int m = (int)(320 / 2 - 50.0F / 2.0F);
        int n = (int)(320 / 2 - 50.0F / 2.0F - 3 - 50.0F);
        int i1 = (int)(320 / 2 + 50.0F / 2.0F + 3);
        RelativeLayout.LayoutParams localLayoutParams1 = (RelativeLayout.LayoutParams)af00.getLayoutParams();
        localLayoutParams1.leftMargin = convertDipToPx(Appcontext, j);
        localLayoutParams1.topMargin = convertDipToPx(Appcontext, n);
        af00.setLayoutParams(localLayoutParams1);
        RelativeLayout.LayoutParams localLayoutParams2 = (RelativeLayout.LayoutParams)af01.getLayoutParams();
        localLayoutParams2.leftMargin = convertDipToPx(Appcontext, i);
        localLayoutParams2.topMargin = convertDipToPx(Appcontext, n);
        af01.setLayoutParams(localLayoutParams2);
        RelativeLayout.LayoutParams localLayoutParams3 = (RelativeLayout.LayoutParams)af02.getLayoutParams();
        localLayoutParams3.leftMargin = convertDipToPx(Appcontext, k);
        localLayoutParams3.topMargin = convertDipToPx(Appcontext, n);
        af02.setLayoutParams(localLayoutParams3);
        RelativeLayout.LayoutParams localLayoutParams4 = (RelativeLayout.LayoutParams)af10.getLayoutParams();
        localLayoutParams4.leftMargin = convertDipToPx(Appcontext, j);
        localLayoutParams4.topMargin = convertDipToPx(Appcontext, m);
        af10.setLayoutParams(localLayoutParams4);
        RelativeLayout.LayoutParams localLayoutParams5 = (RelativeLayout.LayoutParams)af11.getLayoutParams();
        localLayoutParams5.leftMargin = convertDipToPx(Appcontext, i);
        localLayoutParams5.topMargin = convertDipToPx(Appcontext, m);
        af11.setLayoutParams(localLayoutParams5);
        RelativeLayout.LayoutParams localLayoutParams6 = (RelativeLayout.LayoutParams)af12.getLayoutParams();
        localLayoutParams6.leftMargin = convertDipToPx(Appcontext, k);
        localLayoutParams6.topMargin = convertDipToPx(Appcontext, m);
        af12.setLayoutParams(localLayoutParams6);
        RelativeLayout.LayoutParams localLayoutParams7 = (RelativeLayout.LayoutParams)af20.getLayoutParams();
        localLayoutParams7.leftMargin = convertDipToPx(Appcontext, j);
        localLayoutParams7.topMargin = convertDipToPx(Appcontext, i1);
        af20.setLayoutParams(localLayoutParams7);
        RelativeLayout.LayoutParams localLayoutParams8 = (RelativeLayout.LayoutParams)af21.getLayoutParams();
        localLayoutParams8.leftMargin = convertDipToPx(Appcontext, i);
        localLayoutParams8.topMargin = convertDipToPx(Appcontext, i1);
        af21.setLayoutParams(localLayoutParams8);
        RelativeLayout.LayoutParams localLayoutParams9 = (RelativeLayout.LayoutParams)af22.getLayoutParams();
        localLayoutParams9.leftMargin = convertDipToPx(Appcontext, k);
        localLayoutParams9.topMargin = convertDipToPx(Appcontext, i1);
        af22.setLayoutParams(localLayoutParams9);
        break;
        af00.setImageResource(2130837552);
        af01.setImageResource(2130837552);
        af02.setImageResource(2130837552);
        af10.setImageResource(2130837552);
        af11.setImageResource(2130837552);
        af12.setImageResource(2130837552);
        af20.setImageResource(2130837552);
        af21.setImageResource(2130837552);
        af22.setImageResource(2130837552);
      }
      if (this.AFData[i3].equals("0x1"))
      {
        af01.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("0x2"))
      {
        af02.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("1x0"))
      {
        af10.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("1x1"))
      {
        af11.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("1x2"))
      {
        af12.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("2x0"))
      {
        af20.setVisibility(0);
        continue;
      }
      if (this.AFData[i3].equals("2x1"))
      {
        af21.setVisibility(0);
        continue;
      }
      if (!this.AFData[i3].equals("2x2"))
        continue;
      af22.setVisibility(0);
    }
  }

  private static void afgonedisplay()
  {
    af00.setVisibility(8);
    af01.setVisibility(8);
    af02.setVisibility(8);
    af10.setVisibility(8);
    af11.setVisibility(8);
    af12.setVisibility(8);
    af20.setVisibility(8);
    af21.setVisibility(8);
    af22.setVisibility(8);
  }

  public static void appclose()
  {
    if (timetask != null)
      timetask.cancel();
    bClosing = true;
    if (conn != null)
      conn.disconnect();
    bsurfacedisplay = false;
    if (inputstream != null);
    try
    {
      inputstream.close();
      inputstream = null;
      if (bConnect)
      {
        stop_codec();
        if (threadrun != null)
          threadrun.stop();
      }
      bConnect = false;
      if (mycontrolpoint != null)
      {
        if (DSCdevice != null)
          mycontrolpoint.unsubscribe(DSCdevice);
        mycontrolpoint.finalize();
      }
      Logger.e("INRY", "1 ----------- setWifiEnabled(false) -------------");
      if (Appcontext != null)
        WifiUtils.removeCameraConfigration(Appcontext, true);
      if (mSH100)
      {
        if ((!bbackhotspot) && (!bVersionFail))
          setHotspotback();
        if (!bappclose)
          bappclose = true;
        backap();
        return;
      }
    }
    catch (IOException localIOException)
    {
      while (true)
      {
        localIOException.printStackTrace();
        continue;
        systemExit();
      }
    }
  }

  private void availshotsdisplay()
  {
    RelativeLayout.LayoutParams localLayoutParams = (RelativeLayout.LayoutParams)this.availshots.getLayoutParams();
    if (orientation == 2)
    {
      localLayoutParams.leftMargin = 420;
      this.availshots.setLayoutParams(localLayoutParams);
      if (AvailShots.equals("-1"))
        break label185;
      this.availshots.setText(AvailShots);
      label55: if (((!AvailShots.equals("0")) && (!AvailShots.equals("-1"))) || (!bConnect))
        break label216;
      if (AvailShots.equals("-1"))
        this.textmemory.setText(2130968590);
      this.memoryfull.setVisibility(0);
      this.textmemory.setVisibility(0);
      shutter_button.setEnabled(false);
      if (bmImg != null)
        displaythumbail();
      if (this.bfulldisplay)
      {
        if (!AvailShots.equals("-1"))
          break label198;
        nDisplayFlag = 29;
        mHandler.post(r);
      }
    }
    while (true)
    {
      return;
      localLayoutParams.leftMargin = 206;
      break;
      label185: this.availshots.setText("0");
      break label55;
      label198: nDisplayFlag = 18;
      mHandler.post(r);
      continue;
      label216: if ((AvailShots.equals("0")) || (!bConnect))
        continue;
      this.memoryfull.setVisibility(8);
      this.textmemory.setVisibility(8);
      if (bshutter)
        continue;
      shutterbutton(true);
    }
  }

  private static void backap()
  {
    if ((bForshow) || (bVersionFail))
      systemExit();
    while (true)
    {
      return;
      if (OldApState == 3)
        systemExit();
      if (shutter_button != null)
      {
        shutter_button.setEnabled(false);
        shutterbutton(false);
      }
      if (mSH100)
      {
        new Thread(new Runnable()
        {
          public void run()
          {
            try
            {
              LiveShutter.WifiApState = LiveShutter.getWifiApState();
              if (LiveShutter.WifiApState == 1)
              {
                if (LiveShutter.bOldWifiEnablded.booleanValue())
                  LiveShutter.wifimanager.setWifiEnabled(true);
                System.gc();
                LiveShutter.systemExit();
              }
              while (true)
              {
                label36: LiveShutter.exit_play.postDelayed(this, 1000L);
                return;
                if (LiveShutter.WifiApState == 4)
                {
                  LiveShutter.setWifiApEnabled(true);
                  continue;
                }
                if (LiveShutter.WifiApState != 3)
                  continue;
                LiveShutter.setWifiApEnabled(false);
              }
            }
            catch (Exception localException)
            {
              break label36;
            }
          }
        }).start();
        continue;
      }
      systemExit();
    }
  }

  private void batterydisplay()
  {
    switch (battlevel)
    {
    default:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    }
    while (true)
    {
      return;
      this.battery.setImageResource(2130837514);
      continue;
      this.battery.setImageResource(2130837515);
      continue;
      this.battery.setImageResource(2130837516);
      continue;
      this.battery.setImageResource(2130837517);
      continue;
      this.battery.setImageResource(2130837518);
      continue;
      this.battery.setImageResource(2130837519);
      continue;
      this.battery.setImageResource(2130837520);
    }
  }

  private void buttondisplay(boolean paramBoolean)
  {
    if (!paramBoolean)
    {
      flash_button.setVisibility(8);
      timer_button.setVisibility(8);
      photosize_button.setVisibility(8);
      bbuttondisplay = true;
    }
    while (true)
    {
      return;
      flash_button.setVisibility(0);
      timer_button.setVisibility(0);
      photosize_button.setVisibility(0);
      bbuttondisplay = false;
    }
  }

  private void checkDevice(Device paramDevice)
  {
    this.mDeviceList = mycontrolpoint.getDeviceList();
    int i = this.mDeviceList.size();
    int j = 0;
    for (int k = 0; ; k++)
    {
      if (k >= i);
      while (true)
      {
        if (j == 0)
          DSCdevice = null;
        return;
        String str = new String(this.mDeviceList.getDevice(k).getDeviceType());
        if (!str.contains("MediaServer"))
          break;
        nDisplayFlag = 15;
        mHandler.postDelayed(r, 1L);
        Device localDevice = this.mDeviceList.getDevice(k);
        Action localAction1 = null;
        Action localAction2 = null;
        Action localAction3 = null;
        Action localAction4 = null;
        Action localAction5 = null;
        Action localAction6 = null;
        Action localAction7 = null;
        Action localAction8 = null;
        Action localAction9 = null;
        if (localDevice != null)
        {
          localAction1 = localDevice.getAction("GetInfomation");
          localAction2 = localDevice.getAction("SetResolution");
          localAction3 = localDevice.getAction("ZoomIN");
          localAction4 = localDevice.getAction("ZoomOUT");
          localAction5 = localDevice.getAction("MULTIAF");
          localAction6 = localDevice.getAction("Shot");
          localAction7 = localDevice.getAction("ShotWithGPS");
          localAction8 = localDevice.getAction("SetLED");
          localAction9 = localDevice.getAction("SetFlash");
        }
        if ((bConnect) || (localAction1 == null) || (localAction2 == null) || (localAction3 == null) || (localAction4 == null) || (localAction5 == null) || (localAction6 == null) || (localAction7 == null) || (localAction8 == null) || (localAction9 == null))
          break;
        j = 1;
        DSCdevice = localDevice;
        this.GetInfomationAct = localAction1;
        this.SetResolutionAct = localAction2;
        this.ZoomINAct = localAction3;
        this.ZoomOUTAct = localAction4;
        this.MULTIAFAct = localAction5;
        this.ShotAct = localAction6;
        this.ShotWithGPSAct = localAction7;
        this.SetLEDAct = localAction8;
        this.SetFlashAct = localAction9;
        registerDisconnectReceiver();
      }
    }
  }

  private void checkbattery()
  {
    this.batvalue = registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED")).getIntExtra("level", -1);
    if (Utils.isSCHi909())
      this.batvalue /= 10;
    if (this.batvalue <= 7)
    {
      if (timetask != null)
        timetask.cancel();
      if (!this.bbatterypopupflag)
      {
        nDisplayFlag = 31;
        mHandler.post(r);
      }
    }
    while (true)
    {
      return;
      displaybatterylevel();
    }
  }

  private void checkphonecamtype()
  {
    if ((bClosing) || (!codec_init))
      return;
    Logger.d("INRY", "checkphonecamtype cameratype=" + this.cameratype + ", orientation=" + orientation);
    nCutFrame = 0;
    label91: label102: int i;
    if ((this.cameratype.equals("ssdp:rotationD")) || (this.cameratype.equals("ssdp:rotationU")))
      if (orientation == 2)
      {
        phonecamtype = 3;
        this.cameratype.equals("ssdp:rotationD");
        i = 0;
        if (!this.cameratype.equals("ssdp:rotationD"))
          break label236;
        i = 0;
      }
    while (true)
    {
      Logger.d("INRY", "FFmpegJNI.request arg1=" + (phonecamtype - 1) + ", degree=" + i);
      FFmpegJNI.request(FFmpegJNI.Command.SCREEN_CONFIG_CHANGE, phonecamtype - 1, i);
      break;
      phonecamtype = 1;
      break label91;
      if ((!this.cameratype.equals("ssdp:rotationL")) && (!this.cameratype.equals("ssdp:rotationR")))
        break label102;
      if (orientation == 2)
        phonecamtype = 4;
      while (true)
      {
        this.cameratype.equals("ssdp:rotationR");
        break;
        phonecamtype = 2;
      }
      label236: if (this.cameratype.equals("ssdp:rotationR"))
      {
        i = 90;
        continue;
      }
      if (this.cameratype.equals("ssdp:rotationU"))
      {
        i = 180;
        continue;
      }
      if (!this.cameratype.equals("ssdp:rotationL"))
        continue;
      i = 270;
    }
  }

  public static void clearscreen()
  {
      Canvas localCanvas;
    switch (phonecamtype)
    {
    default:
      if ((displaybmp != null) && (bsurfaceflag) && (!Thread.currentThread().isInterrupted()) && (holder != null))
        break;
    case 3:
    case 4:
    case 1:
    case 2:
    }
    while (true)
    {
      return;
      displaybmp = Bitmap.createScaledBitmap(bgbitmap, nHolder533, nHolder320, true);
      break;
      displaybmp = Bitmap.createScaledBitmap(bgbitmap1, nHolder320, nHolder533, true);
      break;
      try
      {
        localCanvas = holder.lockCanvas(null);
        
        if (localCanvas == null)
        {
          if (localCanvas == null)
            continue;
          holder.unlockCanvasAndPost(localCanvas);
          continue;
        }
        synchronized (holder)
        {
          localCanvas.drawBitmap(displaybmp, 0.0F, 0.0F, null);
          if (localCanvas == null)
            continue;
          holder.unlockCanvasAndPost(localCanvas);
        }
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        if (localCanvas == null)
          continue;
        holder.unlockCanvasAndPost(localCanvas);
        continue;
      }
      finally
      {
        if (localCanvas != null)
          holder.unlockCanvasAndPost(localCanvas);
      }
    }
  }

  public static int convertDipToPx(Context paramContext, int paramInt)
  {
    return (int)(0.5F + paramContext.getResources().getDisplayMetrics().density * paramInt);
  }

  public static String deg_to_dms(double paramDouble)
  {
    if (paramDouble < 0.0D);
    Object[] arrayOfObject;
    for (String str = ""; ; str = String.format("%d/1,%d/1,%.02f/1", arrayOfObject))
    {
      return str;
      int i = (int)paramDouble;
      double d1 = 60.0D * (paramDouble - i);
      int j = (int)d1;
      double d2 = roundDouble(60.0D * (d1 - j), 2);
      if (d2 == 60.0D)
        j++;
      if (j == 60)
      {
        i++;
        j = 0;
      }
      arrayOfObject = new Object[3];
      arrayOfObject[0] = Integer.valueOf(i);
      arrayOfObject[1] = Integer.valueOf(j);
      arrayOfObject[2] = Double.valueOf(d2);
    }
  }

  private void displayResolutionButton(int paramInt)
  {
    Logger.d("INRY", "displayResolutionButton 1 selected =" + paramInt + ", size=" + this.mResolutionArrayList.size());
    String str;
    if (this.mResolutionArrayList.size() > 0)
    {
      Logger.d("INRY", "displayResolutionButton 2 selected =" + paramInt);
      DSCResolutionBean localDSCResolutionBean = (DSCResolutionBean)this.mResolutionArrayList.get(paramInt);
      if (localDSCResolutionBean != null)
      {
        Logger.d("INRY", "displayResolutionButton 3 selected =" + paramInt);
        str = Utils.unitChange(localDSCResolutionBean.getWidth(), localDSCResolutionBean.getHeight());
        Logger.d("INRY", "SELECTED RESOLUTIONS= " + str);
        if (!str.startsWith("1 M"))
          break label164;
        photosize_button.setImageResource(2130837535);
      }
    }
    while (true)
    {
      return;
      label164: if (str.startsWith("2 M"))
      {
        photosize_button.setImageResource(2130837536);
        continue;
      }
      if (str.startsWith("3 M"))
      {
        photosize_button.setImageResource(2130837537);
        continue;
      }
      if (str.startsWith("5 M"))
      {
        photosize_button.setImageResource(2130837538);
        continue;
      }
      if (str.startsWith("8 M"))
      {
        photosize_button.setImageResource(2130837539);
        continue;
      }
      if (str.startsWith("10 M"))
      {
        photosize_button.setImageResource(2130837531);
        continue;
      }
      if (str.startsWith("12 M"))
      {
        photosize_button.setImageResource(2130837532);
        Logger.d("INRY", "displayResolutionButton 4 selected ");
        continue;
      }
      if (str.startsWith("14 M"))
      {
        photosize_button.setImageResource(2130837533);
        continue;
      }
      if (str.startsWith("16 M"))
      {
        photosize_button.setImageResource(2130837534);
        continue;
      }
      photosize_button.setImageResource(2130837531);
      continue;
      photosize_button.setImageResource(2130837531);
    }
  }

  private void displayResolutionButton(int paramInt, boolean paramBoolean)
  {
    String str;
    if (this.mResolutionArrayList.size() > 0)
    {
      DSCResolutionBean localDSCResolutionBean = (DSCResolutionBean)this.mResolutionArrayList.get(paramInt);
      if (localDSCResolutionBean != null)
      {
        str = Utils.unitChange(localDSCResolutionBean.getWidth(), localDSCResolutionBean.getHeight());
        Logger.d("INRY", "SELECTED RESOLUTIONS 1 = " + str);
        if (!paramBoolean)
          break label285;
        if (!str.startsWith("1 M"))
          break label89;
        photosize_button.setImageResource(2130837591);
      }
    }
    while (true)
    {
      return;
      label89: if (str.startsWith("2 M"))
      {
        photosize_button.setImageResource(2130837593);
        continue;
      }
      if (str.startsWith("3 M"))
      {
        photosize_button.setImageResource(2130837595);
        continue;
      }
      if (str.startsWith("5 M"))
      {
        photosize_button.setImageResource(2130837597);
        continue;
      }
      if (str.startsWith("8 M"))
      {
        photosize_button.setImageResource(2130837599);
        continue;
      }
      if (str.startsWith("10 M"))
      {
        photosize_button.setImageResource(2130837583);
        continue;
      }
      if (str.startsWith("12 M"))
      {
        photosize_button.setImageResource(2130837585);
        continue;
      }
      if (str.startsWith("14 M"))
      {
        photosize_button.setImageResource(2130837587);
        continue;
      }
      if (str.startsWith("16 M"))
      {
        photosize_button.setImageResource(2130837589);
        continue;
      }
      photosize_button.setImageResource(2130837583);
      continue;
      label285: if (str.startsWith("1 M"))
      {
        photosize_button.setImageResource(2130837590);
        continue;
      }
      if (str.startsWith("2 M"))
      {
        photosize_button.setImageResource(2130837592);
        continue;
      }
      if (str.startsWith("3 M"))
      {
        photosize_button.setImageResource(2130837594);
        continue;
      }
      if (str.startsWith("5 M"))
      {
        photosize_button.setImageResource(2130837596);
        continue;
      }
      if (str.startsWith("8 M"))
      {
        photosize_button.setImageResource(2130837598);
        continue;
      }
      if (str.startsWith("10 M"))
      {
        photosize_button.setImageResource(2130837582);
        continue;
      }
      if (str.startsWith("12 M"))
      {
        photosize_button.setImageResource(2130837584);
        continue;
      }
      if (str.startsWith("14 M"))
      {
        photosize_button.setImageResource(2130837586);
        continue;
      }
      if (str.startsWith("16 M"))
      {
        photosize_button.setImageResource(2130837588);
        continue;
      }
      photosize_button.setImageResource(2130837582);
    }
  }

  private void displaybatterylevel()
  {
    int i = battlevel;
    if (this.batvalue <= 10)
      battlevel = 1;
    while (true)
    {
      if (i != battlevel)
      {
        nDisplayFlag = 4;
        mHandler.post(r);
      }
      return;
      if ((this.batvalue > 10) && (this.batvalue <= 15))
      {
        battlevel = 2;
        continue;
      }
      if ((this.batvalue > 15) && (this.batvalue <= 20))
      {
        battlevel = 3;
        continue;
      }
      if ((this.batvalue > 20) && (this.batvalue <= 40))
      {
        battlevel = 4;
        continue;
      }
      if ((this.batvalue > 40) && (this.batvalue <= 60))
      {
        battlevel = 5;
        continue;
      }
      if ((this.batvalue > 60) && (this.batvalue <= 80))
      {
        battlevel = 6;
        continue;
      }
      if ((this.batvalue <= 80) || (this.batvalue > 100))
        continue;
      battlevel = 7;
    }
  }

  private void displaythumbail()
  {
    if (bmImg != null)
    {
      Bitmap localBitmap = Bitmap.createScaledBitmap(bmImg, 44, 44, true);
      this.thumbnail.setImageBitmap(localBitmap);
      if (this.bStart)
      {
        playback_button.setVisibility(0);
        this.back_layout.setVisibility(0);
        this.thumbnail.setVisibility(0);
      }
    }
  }

  private void doAfterUserWifiSetting()
  {
    WifiManager localWifiManager = (WifiManager)getSystemService("wifi");
    if (localWifiManager.isWifiEnabled())
      if (Utils.supportDSCPrefix(localWifiManager.getConnectionInfo().getSSID()))
      {
        Logger.d("INRY", "1!!!!!!!!!!!!!");
        new Thread(new Runnable()
        {
          public void run()
          {
            try
            {
              Thread.sleep(3000L);
              LiveShutter.setmHandler(14);
            }
            catch (InterruptedException localInterruptedException1)
            {
              try
              {
                Thread.sleep(100L);
                LiveShutter.setmHandler(107);
                return;
                localInterruptedException1 = localInterruptedException1;
                localInterruptedException1.printStackTrace();
              }
              catch (InterruptedException localInterruptedException2)
              {
                while (true)
                  localInterruptedException2.printStackTrace();
              }
            }
          }
        }).start();
      }
    while (true)
    {
      return;
      Logger.d("INRY", "2!!!!!!!!!!!!!");
      showDialog(15);
     Thread shutter = new Thread(new Runnable()
      {
        public void run()
        {
          try
          {
            Thread.sleep(3000L);
            LiveShutter.this.holderremove();
            LiveShutter.appclose();
            return;
          }
          catch (InterruptedException localInterruptedException)
          {
            while (true)
              localInterruptedException.printStackTrace();
          }
        }
      });
     shutter.start();
      continue;
      Logger.d("INRY", "3!!!!!!!!!!!!!");
      showDialog(15);
      holderremove();
      appclose();
    }
  }

  public static void finishWifiActivity()
  {
  }

  private Dialog getCustomDialog()
  {
    Logger.d("myLog", "22222222222222222222");
    View localView = ((LayoutInflater)getSystemService("layout_inflater")).inflate(2130903041, (ViewGroup)findViewById(2131099649));
    AlertDialog.Builder localBuilder = new AlertDialog.Builder(this);
    localBuilder.setTitle(2130968609);
    localBuilder.setView(localView);
    localBuilder.setPositiveButton(2130968592, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        paramDialogInterface.dismiss();
        if (LiveShutter.this.noticecheck.isChecked())
          Logger.e("myLog", "notice is checked");
        try
        {
          LiveShutter.this.saveNotice();
          if (LiveShutter.mGeneral)
          {
            LiveShutter.this.showDialog(17);
            return;
          }
        }
        catch (IOException localIOException)
        {
          while (true)
          {
            localIOException.printStackTrace();
            continue;
            LiveShutter.this.DoCheckAPMode();
          }
        }
      }
    });
    localBuilder.setOnKeyListener(new DialogInterface.OnKeyListener()
    {
      public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
      {
        switch (paramInt)
        {
        default:
        case 4:
        }
        for (int i = 0; ; i = 1)
        {
          return i;
          LiveShutter.this.finish();
        }
      }
    });
    this.noticecheck = ((CheckBox)localView.findViewById(2131099651));
    Logger.e("myLog", "notice is : " + this.noticecheck.isChecked());
    this.noticecheck.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()
    {
      public void onCheckedChanged(CompoundButton paramCompoundButton, boolean paramBoolean)
      {
        LiveShutter.this.noticecheck.setChecked(paramBoolean);
        Logger.e("myLog", "notice is : " + LiveShutter.this.noticecheck.isChecked());
      }
    });
    return localBuilder.create();
  }

  private WifiConfiguration getWifiApConfiguration()
  {
    try
    {
      WifiConfiguration localWifiConfiguration2 = (WifiConfiguration)wifimanager.getClass().getMethod("getWifiApConfiguration", new Class[0]).invoke(wifimanager, new Object[0]);
      return localWifiConfiguration2;
    }
    catch (Exception localException)
    {
        return null;
    }
  }

  private WifiConfiguration getWifiApDefaultConfiguration()
  {
    WifiConfiguration localWifiConfiguration1 = new WifiConfiguration();
    try
    {
      localWifiConfiguration1.SSID = "AndroidAP";
      localWifiConfiguration1.allowedKeyManagement.set(0);
      return localWifiConfiguration1;
    }
    catch (Exception localException)
    {
        return null;
    }
  }

  private WifiConfiguration getWifiApProfileConfiguration()
  {
    try
    {
      WifiConfiguration localWifiConfiguration2 = (WifiConfiguration)wifimanager.getClass().getMethod("getWifiApProfileConfiguration", new Class[0]).invoke(wifimanager, new Object[0]);
      return localWifiConfiguration2;
    }
    catch (Exception localException)
    {
      while (true)
        return null;
    }
  }

  private static int getWifiApState()
  {
    int j;
    try
    {
      j = ((Integer)wifimanager.getClass().getMethod("getWifiApState", new Class[0]).invoke(wifimanager, new Object[0])).intValue();
      switch (j)
      {
      case 11:
      case 12:
      case 13:
        Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "getWifiApState() value : " + String.valueOf(j));
        return (j - 10);
      }
    }
    catch (Exception localException)
    {
      return 4;
    }
    return j;
  }

  private void holderremove()
  {
    if (holder != null)
    {
      bsurfaceflag = false;
      holder.removeCallback(this);
      holder = null;
    }
  }

  private void initLayout()
  {
    flash_button = (ImageButton)findViewById(2131099656);
    timer_button = (ImageButton)findViewById(2131099657);
    photosize_button = (ImageButton)findViewById(2131099658);
    shutter_button = (ImageButton)findViewById(2131099659);
    playback_button = (ImageView)findViewById(2131099661);
    this.thumbnail = ((ImageView)findViewById(2131099662));
    zoomout_button = (ImageButton)findViewById(2131099663);
    zoomin_button = (ImageButton)findViewById(2131099665);
    this.timecount = ((ImageView)findViewById(2131099667));
    this.availshots = ((TextView)findViewById(2131099654));
    this.battery = ((ImageView)findViewById(2131099655));
    af00 = (ImageView)findViewById(2131099668);
    af01 = (ImageView)findViewById(2131099669);
    af02 = (ImageView)findViewById(2131099670);
    af10 = (ImageView)findViewById(2131099671);
    af11 = (ImageView)findViewById(2131099672);
    af12 = (ImageView)findViewById(2131099673);
    af20 = (ImageView)findViewById(2131099674);
    af21 = (ImageView)findViewById(2131099675);
    af22 = (ImageView)findViewById(2131099676);
    this.memoryfull = ((ImageView)findViewById(2131099677));
    this.textmemory = ((TextView)findViewById(2131099678));
    this.zoom_indicator = ((ImageView)findViewById(2131099666));
    this.back_layout = ((FrameLayout)findViewById(2131099660));
  }

  private void initcodec()
  {
    done_count = 0;
    String str1;
    if (Utils.isNexusOne())
      if (!codec_init)
      {
        codec_init = true;
        m_isFrameRefresh = true;
        checkphonecamtype();
        str1 = new String("ffplay -livestreaming -an -sync video -pix_fmt rgb565le -demuxprobesize 1024 ");
        str2 = null;
        if ((!this.StreamURL.contains(".avi")) && (!this.StreamURL.contains(".AVI")))
          break label134;
      }
    for (String str2 = str1.concat("-f avi "); ; str2 = str1.concat("-f mp4 "))
      label134: 
      do
      {
        FFmpegJNI.request(FFmpegJNI.Command.VIDEO_STREAMING_START, str2.concat(this.StreamURL));
        if (screentype == 1)
        {
          bsurfacedisplay = true;
          GetThumbnail();
        }
        if ((threadrun != null) || (threadframe == null));
        Logger.i("STATE", "initcodec() --");
        bKeyFlag = true;
        return;
        break;
      }
      while ((!this.StreamURL.contains(".mp4")) && (!this.StreamURL.contains(".MP4")));
  }

  private boolean isConnectCamAP()
  {
    boolean bool = false;
    if (wifimanager.isWifiEnabled())
    {
      String str = wifimanager.getConnectionInfo().getSSID();
      if (str != null)
        bool = Utils.supportDSCPrefix(str);
    }
    return bool;
  }

  private void loadingdisplay()
  {
    bsurfacedisplay = false;
    screentype = 2;
    startActivityForResult(new Intent(this, PlayBack.class), 1);
  }

  private void readNotice()
    throws IOException
  {
    Logger.e("myLog", "readNotice   :::   start");
    FileInputStream localFileInputStream = openFileInput("notice_LiveShutter._db1");
    byte[] arrayOfByte = new byte[localFileInputStream.available()];
    while (localFileInputStream.read(arrayOfByte) != -1);
    localFileInputStream.close();
    String str = new String(arrayOfByte);
    Logger.e("myLog", "Notice   :::  " + str);
    if (str.equals("true"))
      Logger.e("myLog", "Notice   :::   true");
    for (this.mNotice = true; ; this.mNotice = false)
    {
      return;
      Logger.e("myLog", "Notice   :::   false");
    }
  }

  private void registerDebuggerReceiver()
  {
    this.mWifiStateDebuggerReceiver = new WifiStateDebuggerReceiver(null);
    IntentFilter localIntentFilter = new IntentFilter("android.net.wifi.WIFI_STATE_CHANGED");
    localIntentFilter.addAction("android.net.wifi.STATE_CHANGE");
    localIntentFilter.addAction("android.net.wifi.WIFI_AP_STATE_CHANGED");
    registerReceiver(this.mWifiStateDebuggerReceiver, localIntentFilter);
  }

  private void registerDisconnectReceiver()
  {
    this.mWifiStateChangedReceiverForAppClose = new WifiStateChangedReceiverForAppClose(null);
    IntentFilter localIntentFilter = new IntentFilter("android.net.wifi.STATE_CHANGE");
    registerReceiver(this.mWifiStateChangedReceiverForAppClose, localIntentFilter);
  }

  private void registerSettingCloseReceiver()
  {
    this.mWifiStateChangedReceiverForSettingClose = new WifiStateChangedReceiverForSettingClose(null);
    IntentFilter localIntentFilter = new IntentFilter("android.net.wifi.STATE_CHANGE");
    registerReceiver(this.mWifiStateChangedReceiverForSettingClose, localIntentFilter);
  }

  public static final double roundDouble(double paramDouble, int paramInt)
  {
    return Math.round(paramDouble * Math.pow(10.0D, paramInt)) / Math.pow(10.0D, paramInt);
  }

  private void saveNotice()
    throws IOException
  {
    try
    {
      FileOutputStream localFileOutputStream = openFileOutput("notice_LiveShutter._db1", 0);
      try
      {
        localFileOutputStream.write("true".getBytes());
        localFileOutputStream.close();
        return;
      }
      catch (IOException localIOException)
      {
        while (true)
          localIOException.printStackTrace();
      }
    }
    catch (FileNotFoundException localFileNotFoundException)
    {
      while (true)
        localFileNotFoundException.printStackTrace();
    }
  }

  private void setHotspot()
  {
    wifimanager = (WifiManager)getSystemService("wifi");
    wifiConfig = getWifiApConfiguration();
    if (wifiConfig == null)
    {
      wifiConfig = getWifiApProfileConfiguration();
      if (wifiConfig == null)
        wifiConfig = getWifiApDefaultConfiguration();
    }
    if (wifiConfig == null)
      showDialog(16);
    while (true)
    {
      return;
      if (wifiConfig.SSID == null)
        wifiConfig = getWifiApDefaultConfiguration();
      while (true)
      {
        Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "Personal Hotspot SSID : " + wifiConfig.SSID);
        this.proap = ProgressDialog.show(this, null, getString(2130968600), true, false);
        this.proap.setOnKeyListener(new DialogInterface.OnKeyListener()
        {
          public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
          {
            if (paramKeyEvent.getKeyCode() == 84);
            for (int i = 1; ; i = 0)
              return i;
          }
        });
        if (!bForshow)
          break label257;
        this.timerun = new TimerRun();
        this.mrunTimer = new Timer();
        this.mrunTimer.schedule(this.timerun, 3000L);
        break;
        if (wifiConfig.SSID.length() != 0)
          continue;
        wifiConfig = getWifiApDefaultConfiguration();
      }
      label257: int i = wifimanager.getWifiState();
      Logger.d("myLog", "nWifistate :" + i);
      if ((i == 2) || (i == 3) || (i == 4))
        bOldWifiEnablded = Boolean.valueOf(true);
      IntentFilter localIntentFilter = new IntentFilter();
      localIntentFilter.addAction("android.net.wifi.WIFI_STATE_CHANGED");
      registerReceiver(this.wifiStateChangedReceiver, localIntentFilter);
      WifiApState = getWifiApState();
      OldApState = WifiApState;
      if ((WifiApState == 0) || (WifiApState == 1) || (WifiApState == 4))
      {
        if (!setWifiApEnabled(true))
        {
          showDialog(16);
          continue;
        }
        bapsett = true;
        continue;
      }
      if (WifiApState == 3)
      {
        this.timerun = new TimerRun();
        this.mrunTimer = new Timer();
        this.mrunTimer.schedule(this.timerun, 3000L);
        continue;
      }
      if (WifiApState == 2)
      {
        bapsett = true;
        continue;
      }
      Logger.e("myLog", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "Unsupported WifiApState : " + WifiApState);
    }
  }

  private static void setHotspotback()
  {
    if (bForshow);
    while (true)
    {
      return;
      WifiApState = getWifiApState();
      if (!bwificonfigchange)
        continue;
      wifiConfig.SSID = OldAPName;
      setWifiApInfo(wifiConfig, true);
      if (OldApState != 3)
        setWifiApEnabled(false);
      bbackhotspot = true;
    }
  }

  private static boolean setWifiApEnabled(boolean paramBoolean)
  {
    if (paramBoolean)
      wifimanager.setWifiEnabled(false);
    try
    {
      Class localClass = wifimanager.getClass();
      Class[] arrayOfClass = new Class[2];
      arrayOfClass[0] = WifiConfiguration.class;
      arrayOfClass[1] = Boolean.TYPE;
      Method localMethod = localClass.getMethod("setWifiApEnabled", arrayOfClass);
      WifiManager localWifiManager = wifimanager;
      Object[] arrayOfObject = new Object[2];
      arrayOfObject[0] = null;
      arrayOfObject[1] = Boolean.valueOf(paramBoolean);
      boolean bool2 = ((Boolean)localMethod.invoke(localWifiManager, arrayOfObject)).booleanValue();
      return bool2;
    }
    catch (Exception localException)
    {
      return false;
    }
  }

  private static boolean setWifiApInfo(WifiConfiguration paramWifiConfiguration, boolean paramBoolean)
  {
    try
    {
      Class localClass = wifimanager.getClass();
      Class[] arrayOfClass = new Class[2];
      arrayOfClass[0] = WifiConfiguration.class;
      arrayOfClass[1] = Boolean.TYPE;
      Method localMethod = localClass.getMethod("setWifiApEnabled", arrayOfClass);
      WifiManager localWifiManager = wifimanager;
      Object[] arrayOfObject = new Object[2];
      arrayOfObject[0] = paramWifiConfiguration;
      arrayOfObject[1] = Boolean.valueOf(paramBoolean);
      boolean bool2 = ((Boolean)localMethod.invoke(localWifiManager, arrayOfObject)).booleanValue();
      return bool2;
    }
    catch (Exception localException)
    {
        return false;
    }
  }

  public static void setmHandler(int paramInt)
  {
    Logger.e("myLog", "nDisplayFlag is :: " + nDisplayFlag);
    nDisplayFlag = paramInt;
    mHandler.postDelayed(r, 10L);
  }

  private static void shutterbutton(boolean paramBoolean)
  {
    flash_button.setEnabled(paramBoolean);
    timer_button.setEnabled(paramBoolean);
    photosize_button.setEnabled(paramBoolean);
    if ((paramBoolean) && (bConnect))
    {
      if (Integer.parseInt(AvailShots) <= 0)
        break label62;
      shutter_button.setEnabled(true);
    }
    while (true)
    {
      zoomout_button.setEnabled(paramBoolean);
      zoomin_button.setEnabled(paramBoolean);
      return;
      label62: shutter_button.setEnabled(false);
    }
  }

  private void startAPSearch()
  {
    Logger.e("myLog", "startAPSearch is start");
    mStartWifiSetting = true;
    if (mGeneral)
      showDialog(17);
    while (true)
    {
      return;
      DoCheckAPMode();
    }
  }

  private void startWifiChecker()
  {
    this.mWifiCamChecker = new WifiCamChecker(this, this.mConnectorHandler);
    this.mWifiCamChecker.start();
  }

  private void startWifiConnector()
  {
    Logger.d("INRY", "WifiConnector!!!!!!!!!!!! start");
    if (Const.Config.DUMMY_WIFI_CONNECT_TYPE == 1)
    {
      this.mWifiConnector = new WifiConnector(this, this.mConnectorHandler);
      this.mWifiConnector.start();
    }
    while (true)
    {
      return;
      if (Const.Config.DUMMY_WIFI_CONNECT_TYPE == 2)
      {
        Intent localIntent = new Intent();
        if (Build.VERSION.SDK_INT >= 11)
          localIntent.setClassName("com.android.settings", "com.android.settings.wifi.WifiPickerActivity");
        while (true)
        {
          startActivityForResult(localIntent, 101);
          break;
          localIntent.setClassName("com.android.settings", "com.android.settings.wifi.WifiSettings");
        }
      }
      this.mWifiDialog = new WifiDialog(this);
      this.mWifiDialog.setCancelable(false);
      this.mWifiDialog.setOnDismissListener(new DialogInterface.OnDismissListener()
      {
        public void onDismiss(DialogInterface paramDialogInterface)
        {
          LiveShutter.this.doAfterUserWifiSetting();
        }
      });
      this.mWifiDialog.show();
    }
  }

  private void startWifiEnabler()
  {
    if (Const.Config.DUMMY_WIFI_CONNECT_TYPE == 2)
      if (!isConnectCamAP())
        showDialog(20);
    while (true)
    {
      return;
      doAfterUserWifiSetting();
      continue;
      startWifiConnector();
    }
  }

  private void stopWifiCamChecker()
  {
    if (this.mWifiCamChecker != null)
    {
      this.mWifiCamChecker.stop();
      this.mWifiCamChecker = null;
    }
  }

  private void stopWifiConnector()
  {
    Logger.d("INRY", "WifiConnector!!!!!!!!!!!! stop");
    if (Const.Config.DUMMY_WIFI_CONNECT_TYPE == 1)
      if (this.mWifiConnector != null)
        this.mWifiConnector.stop();
    while (true)
      return;
  }

  public static void stop_codec()
  {
    NDKRelease();
    nDisplayFlag = 13;
    mHandler.postDelayed(r, 1L);
    afgonedisplay();
    mList.removeAll(mList);
    System.gc();
  }

  public static void systemExit()
  {
    Logger.e("LiveShutter", "systemExit is start!!!! exit is start");
    if (Appcontext != null)
      WifiUtils.removeCameraConfigration(Appcontext, true);
    if (wifimanager != null)
      wifimanager.setWifiEnabled(false);
    System.exit(1);
  }

  private void unregisterDebuggerReceiver()
  {
    if (this.mWifiStateDebuggerReceiver != null)
      unregisterReceiver(this.mWifiStateDebuggerReceiver);
  }

  private void unregisterDisconnectReceiver()
  {
    if (this.mWifiStateChangedReceiverForAppClose != null)
      unregisterReceiver(this.mWifiStateChangedReceiverForAppClose);
  }

  private void unregisterSettingCloseReceiver()
  {
    if (this.mWifiStateChangedReceiverForSettingClose != null)
      unregisterReceiver(this.mWifiStateChangedReceiverForSettingClose);
  }

  private void zoombardisplay()
  {
    RelativeLayout.LayoutParams localLayoutParams = (RelativeLayout.LayoutParams)this.zoom_indicator.getLayoutParams();
    if (orientation == 2);
    for (localLayoutParams.leftMargin = (2 * (this.nZoomland + this.nZoomWidth / (this.ZoomInfoMax - 1) * this.ZoomCount) / 3); ; localLayoutParams.leftMargin = (2 * (this.nZoomport + this.nZoomWidth / (this.ZoomInfoMax - 1) * this.ZoomCount) / 3))
    {
      this.zoom_indicator.setLayoutParams(localLayoutParams);
      return;
    }
  }

  public void CameraChange(String paramString)
  {
    if ((!paramString.equals(this.cameratype)) && (!paramString.equals("")) && ((paramString.equals("ssdp:rotationD")) || (paramString.equals("ssdp:rotationU")) || (paramString.equals("ssdp:rotationL")) || (paramString.equals("ssdp:rotationR"))))
    {
      this.cameratype = paramString;
      new Thread(new Runnable()
      {
        public void run()
        {
          LiveShutter.this.checkphonecamtype();
        }
      }).start();
    }
  }

  public void DeviceChange(int paramInt, Device paramDevice)
  {
    if (paramInt == 256)
      if ((!bConnect) && (DSCdevice == null))
      {
        Logger.d("myLog", "To checkDevice was started!");
        checkDevice(paramDevice);
      }
    while (true)
    {
      return;
      if (paramInt == 257)
      {
        DeviceList localDeviceList = mycontrolpoint.getDeviceList();
        int i = localDeviceList.size();
        int j = 0;
        label161: label163: for (int k = 0; ; k++)
        {
          if (k >= i);
          while (true)
          {
            if ((j != 0) || (paramDevice != DSCdevice))
              break label161;
            if (timetask != null)
              timetask.cancel();
            closedata();
            if (screentype != 1)
              break label169;
            nDisplayFlag = 19;
            mHandler.post(r);
            break;
            if ((!new String(localDeviceList.getDevice(k).getDeviceType()).contains("MediaServer")) || (localDeviceList.getDevice(k) != DSCdevice))
              break label163;
            j = 1;
          }
          break;
        }
        label169: PlayBack.DisplayPopup();
        continue;
      }
    }
  }

  public void DialogFlashSelectOption()
  {
    this.ab = new AlertDialog.Builder(this);
    this.ab.setTitle("Flash");
    this.ab.setSingleChoiceItems(this.FlashData, 0, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
      }
    }).setPositiveButton("Ok", new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        if (LiveShutter.nFlashSelect == 0)
          LiveShutter.flash_button.setImageResource(2130837527);
        while (true)
        {
          LiveShutter.nCheckCount = 0;
          LiveShutter.this.buttondisplay(true);
          LiveShutter.this.SetFlash_DSC();
          paramDialogInterface.cancel();
          LiveShutter.this.ab = null;
          return;
          if (LiveShutter.nFlashSelect != 1)
            continue;
          LiveShutter.flash_button.setImageResource(2130837526);
        }
      }
    }).setNegativeButton("Back", new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
        paramDialogInterface.cancel();
        LiveShutter.this.ab = null;
      }
    }).setSingleChoiceItems(this.FlashData, this.nFlashData, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.nFlashSelect = paramInt;
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
      }
    });
    this.ab.show();
  }

  public void DialogPhotosizeSelectOption()
  {
    this.ab = new AlertDialog.Builder(this);
    this.ab.setTitle("PhotoSize");
    String[] arrayOfString = new String[this.mResolutionArrayList.size()];
    for (int i = 0; ; i++)
    {
      if (i >= this.mResolutionArrayList.size())
      {
        this.ab.setSingleChoiceItems(arrayOfString, 0, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
          }
        }).setPositiveButton("Ok", new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            DSCResolutionBean localDSCResolutionBean = (DSCResolutionBean)LiveShutter.this.mResolutionArrayList.get(LiveShutter.this.nPhotoSizeSelect);
            Logger.d("INRY", "ab.onClick 1 nPhotoSizeSelect=" + LiveShutter.this.nPhotoSizeSelect);
            if (localDSCResolutionBean != null)
            {
              Logger.d("INRY", "ab.onClick 2 nPhotoSizeSelect=" + LiveShutter.this.nPhotoSizeSelect);
              LiveShutter.this.displayResolutionButton(LiveShutter.this.nPhotoSizeSelect);
              LiveShutter.this.SetResolution_DSC();
            }
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            paramDialogInterface.cancel();
            LiveShutter.this.ab = null;
          }
        }).setNegativeButton("Back", new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            paramDialogInterface.cancel();
            LiveShutter.this.ab = null;
          }
        }).setSingleChoiceItems(arrayOfString, this.nPhotoSizeData, new DialogInterface.OnClickListener()
        {
          public void onClick(DialogInterface paramDialogInterface, int paramInt)
          {
            Logger.d("INRY", "setSingleChoiceItems  which = " + paramInt);
            LiveShutter.this.nPhotoSizeSelect = paramInt;
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
          }
        });
        this.ab.show();
        return;
      }
      DSCResolutionBean localDSCResolutionBean = (DSCResolutionBean)this.mResolutionArrayList.get(i);
      localDSCResolutionBean.getHeight();
      localDSCResolutionBean.getWidth();
      String str = Utils.unitChange(localDSCResolutionBean.getHeight(), localDSCResolutionBean.getWidth());
      Object[] arrayOfObject = new Object[3];
      arrayOfObject[0] = str;
      arrayOfObject[1] = Integer.valueOf(localDSCResolutionBean.getWidth());
      arrayOfObject[2] = Integer.valueOf(localDSCResolutionBean.getHeight());
      arrayOfString[i] = String.format("%s (%dx%d)", arrayOfObject);
    }
  }

  public void DialogTimerSelectOption()
  {
    String[] arrayOfString = new String[3];
    arrayOfString[0] = "off";
    arrayOfString[1] = "2sec";
    arrayOfString[2] = "10sec";
    this.ab = new AlertDialog.Builder(this);
    this.ab.setTitle("Timer");
    this.ab.setSingleChoiceItems(arrayOfString, 0, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
      }
    }).setPositiveButton("Ok", new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        if (LiveShutter.this.nTimerSelect == 0)
          LiveShutter.timer_button.setImageResource(2130837542);
        while (true)
        {
          LiveShutter.nCheckCount = 0;
          LiveShutter.this.buttondisplay(true);
          LiveShutter.this.SetLED_DSC();
          paramDialogInterface.cancel();
          LiveShutter.this.ab = null;
          return;
          if (LiveShutter.this.nTimerSelect == 1)
          {
            LiveShutter.timer_button.setImageResource(2130837541);
            continue;
          }
          if (LiveShutter.this.nTimerSelect != 2)
            continue;
          LiveShutter.timer_button.setImageResource(2130837540);
        }
      }
    }).setNegativeButton("Back", new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
        paramDialogInterface.cancel();
        LiveShutter.this.ab = null;
      }
    }).setSingleChoiceItems(arrayOfString, this.nTimerData, new DialogInterface.OnClickListener()
    {
      public void onClick(DialogInterface paramDialogInterface, int paramInt)
      {
        LiveShutter.this.nTimerSelect = paramInt;
        LiveShutter.nCheckCount = 0;
        LiveShutter.this.buttondisplay(true);
      }
    });
    this.ab.show();
  }

  public boolean GetInfomation_DSC()
  {
    if (DSCdevice == null);
    for (int i = 0; ; i = 1)
    {
      return i;
      bConnectwaitflag = true;
      this.nWaitCount = 0;
      new Thread(new Runnable()
      {
        public void run()
        {
          while (LiveShutter.this.GetInfomationAct == null)
          {
            Logger.e("myLog", "GetInfomationAct is null!");
            try
            {
              Thread.sleep(200L);
            }
            catch (InterruptedException localInterruptedException3)
            {
              localInterruptedException3.printStackTrace();
            }
          }
          Node localNode;
          if (LiveShutter.this.GetInfomationAct.postControlAction())
          {
            localNode = ((ActionData)LiveShutter.this.GetInfomationAct.getActionNode().getUserData()).getControlResponse().getBodyNode();
            LiveShutter.bConnect = true;
            LiveShutter.nReadCount = 0;
            LiveShutter.nDisplayFlag = 16;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
          }
          while (true)
          {
            try
            {
              Thread.sleep(6L);
              LiveShutter.nCheckCount = 0;
              LiveShutter.bshutter = false;
              LiveShutter.nDisplayFlag = 34;
              LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
            }
            catch (InterruptedException localInterruptedException1)
            {
              try
              {
                Thread.sleep(6L);
                LiveShutter.this.GetInfoValue(localNode);
                LiveShutter.bConnectwaitflag = false;
                return;
                localInterruptedException1 = localInterruptedException1;
                localInterruptedException1.printStackTrace();
              }
              catch (InterruptedException localInterruptedException2)
              {
                localInterruptedException2.printStackTrace();
                continue;
              }
            }
            LiveShutter.bConnectwaitflag = false;
            UPnPStatus localUPnPStatus = LiveShutter.this.GetInfomationAct.getStatus();
            Logger.e("myLog", "DISPLAY_NETERRORMSG 3" + localUPnPStatus.toString());
            LiveShutter.nDisplayFlag = 10;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
        }
      }).start();
    }
  }

  public void MULTIAF_DSC()
  {
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    new Thread(new Runnable()
    {
      public void run()
      {
        ArgumentList localArgumentList;
        int j;
        if (LiveShutter.this.MULTIAFAct != null)
        {
          if (!LiveShutter.this.MULTIAFAct.postControlAction())
            break label211;
          localArgumentList = LiveShutter.this.MULTIAFAct.getOutputArgumentList();
          int i = localArgumentList.size();
          j = 0;
          if (j < i)
            break label55;
          LiveShutter.bConnectwaitflag = false;
        }
        while (true)
        {
          return;
          label55: Argument localArgument = localArgumentList.getArgument(j);
          String str1 = localArgument.getName();
          String str2 = localArgument.getValue();
          if (LiveShutter.nShutterDnUp == -1);
          while (true)
          {
            j++;
            break;
            if ((str1.equals("AFSTATUS")) && (!str2.equals("AFFAIL")))
            {
              LiveShutter.this.bAFFAIL = false;
              LiveShutter.this.AFData = str2.split(",");
              LiveShutter.nDisplayFlag = 6;
              LiveShutter.mHandler.post(LiveShutter.r);
              continue;
            }
            if ((!str1.equals("AFSTATUS")) || (!str2.equals("AFFAIL")))
              continue;
            LiveShutter.this.bAFFAIL = true;
            LiveShutter.this.AFData = "1x1".split(",");
            LiveShutter.nDisplayFlag = 6;
            LiveShutter.mHandler.post(LiveShutter.r);
          }
          label211: LiveShutter.bConnectwaitflag = false;
          UPnPStatus localUPnPStatus = LiveShutter.this.MULTIAFAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 7" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void SetFlash_DSC()
  {
    this.nFlashData = nFlashSelect;
    switch (this.nFlashData)
    {
    default:
    case 0:
    case 1:
    }
    while (true)
    {
      bConnectwaitflag = true;
      this.nWaitCount = 0;
      new Thread(new Runnable()
      {
        public void run()
        {
          if (LiveShutter.this.SetFlashAct.postControlAction())
            LiveShutter.bConnectwaitflag = false;
          while (true)
          {
            return;
            LiveShutter.bConnectwaitflag = false;
            UPnPStatus localUPnPStatus = LiveShutter.this.SetFlashAct.getStatus();
            Logger.e("myLog", "DISPLAY_NETERRORMSG 11" + localUPnPStatus.toString());
            LiveShutter.nDisplayFlag = 10;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
        }
      }).start();
      return;
      this.SetFlashAct.setArgumentValue("FLASHMODE", "OFF");
      continue;
      this.SetFlashAct.setArgumentValue("FLASHMODE", "AUTO");
    }
  }

  public void SetLED_DSC()
  {
    this.nTimerData = this.nTimerSelect;
    switch (this.nTimerData)
    {
    default:
    case 1:
    case 2:
    }
    while (true)
    {
      bConnectwaitflag = true;
      this.nWaitCount = 0;
      new Thread(new Runnable()
      {
        public void run()
        {
          if (LiveShutter.this.SetLEDAct.postControlAction())
            LiveShutter.bConnectwaitflag = false;
          while (true)
          {
            return;
            LiveShutter.bConnectwaitflag = false;
            UPnPStatus localUPnPStatus = LiveShutter.this.SetLEDAct.getStatus();
            Logger.e("myLog", "DISPLAY_NETERRORMSG 10" + localUPnPStatus.toString());
            LiveShutter.nDisplayFlag = 10;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
        }
      }).start();
      return;
      this.SetLEDAct.setArgumentValue("LEDTIME", "2");
      continue;
      this.SetLEDAct.setArgumentValue("LEDTIME", "10");
    }
  }

  void SetLayout()
  {
    if (orientation == 2)
    {
      DisplayMetrics localDisplayMetrics = new DisplayMetrics();
      getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
      nCanvasX = nHolder533 / 2 - nHolder196 / 2;
    }
  }

  public void SetResolution_DSC()
  {
    this.nPhotoSizeData = this.nPhotoSizeSelect;
    DSCResolutionBean localDSCResolutionBean = (DSCResolutionBean)this.mResolutionArrayList.get(this.nPhotoSizeData);
    Object[] arrayOfObject = new Object[2];
    arrayOfObject[0] = Integer.valueOf(localDSCResolutionBean.getWidth());
    arrayOfObject[1] = Integer.valueOf(localDSCResolutionBean.getHeight());
    String str = String.format("%dx%d", arrayOfObject);
    this.SetResolutionAct.setArgumentValue("RESOLUTION", str);
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    new Thread(new Runnable()
    {
      public void run()
      {
        if (LiveShutter.this.SetResolutionAct.postControlAction())
        {
          Node localNode = ((ActionData)LiveShutter.this.SetResolutionAct.getActionNode().getUserData()).getControlResponse().getBodyNode();
          LiveShutter.this.SetResolutionValue(localNode);
          LiveShutter.bConnectwaitflag = false;
        }
        while (true)
        {
          return;
          LiveShutter.bConnectwaitflag = false;
          UPnPStatus localUPnPStatus = LiveShutter.this.SetResolutionAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 4" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void ShotWithGPS_DSC()
  {
    long l1 = ()(3600.0D * this.currentLocation.getLatitude());
    long l2 = ()(3600.0D * this.currentLocation.getLongitude());
    misGPSShot = true;
    mLatitude = this.currentLocation.getLatitude();
    mLongitude = this.currentLocation.getLongitude();
    String str = "N" + l1 + "XE" + l2;
    this.ShotWithGPSAct.setArgumentValue("GPSINFO", str);
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    nCutFrame = 0;
    new Thread(new Runnable()
    {
      int count = 0;

      public void run()
      {
        if (this.count == 0)
        {
          this.count = (1 + this.count);
          LiveShutter.this.upnp_connect.postDelayed(this, 1000L);
          if (!LiveShutter.this.ShotWithGPSAct.postControlAction())
            break label200;
          Node localNode = ((ActionData)LiveShutter.this.ShotWithGPSAct.getActionNode().getUserData()).getControlResponse().getBodyNode();
          LiveShutter.bConnectwaitflag = false;
          LiveShutter.bShotting = false;
          if ((LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            return;
          LiveShutter.nDisplayFlag = 27;
          LiveShutter.mHandler.post(LiveShutter.r);
          LiveShutter.this.ShotValue(localNode);
        }
        while (true)
        {
          if ((this.count == 2) && (!LiveShutter.bClosing) && (!LiveShutter.bResumeStart))
          {
            LiveShutter.nDisplayFlag = 20;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
          if ((this.count >= 2) || (LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            break;
          this.count = (1 + this.count);
          LiveShutter.this.upnp_connect.postDelayed(this, 1000L);
          break;
          label200: LiveShutter.bConnectwaitflag = false;
          if ((LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            break;
          UPnPStatus localUPnPStatus = LiveShutter.this.ShotWithGPSAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 9" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void Shot_DSC()
  {
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    nCutFrame = 0;
    misGPSShot = false;
    new Thread(new Runnable()
    {
      int count = 0;

      public void run()
      {
        if (this.count == 0)
        {
          this.count = (1 + this.count);
          LiveShutter.this.upnp_connect.postDelayed(this, 1000L);
          if (!LiveShutter.this.ShotAct.postControlAction())
            break label200;
          Node localNode = ((ActionData)LiveShutter.this.ShotAct.getActionNode().getUserData()).getControlResponse().getBodyNode();
          LiveShutter.bConnectwaitflag = false;
          LiveShutter.bShotting = false;
          if ((LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            return;
          LiveShutter.nDisplayFlag = 27;
          LiveShutter.mHandler.post(LiveShutter.r);
          LiveShutter.this.ShotValue(localNode);
        }
        while (true)
        {
          if ((this.count == 2) && (!LiveShutter.bClosing) && (!LiveShutter.bResumeStart))
          {
            LiveShutter.nDisplayFlag = 20;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
          if ((this.count >= 2) || (LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            break;
          this.count = (1 + this.count);
          LiveShutter.this.upnp_connect.postDelayed(this, 1000L);
          break;
          label200: LiveShutter.bConnectwaitflag = false;
          if ((LiveShutter.bClosing) || (LiveShutter.bResumeStart))
            break;
          UPnPStatus localUPnPStatus = LiveShutter.this.ShotAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 8" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void ZoomIN_DSC()
  {
    Logger.d("INRY", "ZoomIN_DSC");
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    new Thread(new Runnable()
    {
      public void run()
      {
        ArgumentList localArgumentList;
        int j;
        if (LiveShutter.this.ZoomINAct.postControlAction())
        {
          localArgumentList = LiveShutter.this.ZoomINAct.getOutputArgumentList();
          int i = localArgumentList.size();
          j = 0;
          if (j >= i)
            LiveShutter.bConnectwaitflag = false;
        }
        while (true)
        {
          return;
          Argument localArgument = localArgumentList.getArgument(j);
          String str1 = localArgument.getName();
          String str2 = localArgument.getValue();
          if (str1.equals("CURRENTZOOM"))
          {
            LiveShutter.this.ZoomCount = Integer.parseInt(str2);
            Logger.d("INRY", "ZOOM_IN REQ 2-1 ZoomCount" + LiveShutter.this.ZoomCount);
            LiveShutter.nDisplayFlag = 30;
            LiveShutter.mHandler.post(LiveShutter.r);
          }
          j++;
          break;
          LiveShutter.bConnectwaitflag = false;
          UPnPStatus localUPnPStatus = LiveShutter.this.ZoomINAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 5" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void ZoomOUT_DSC()
  {
    Logger.d("INRY", "ZoomOUT_DSC");
    bConnectwaitflag = true;
    this.nWaitCount = 0;
    new Thread(new Runnable()
    {
      public void run()
      {
        ArgumentList localArgumentList;
        int j;
        if (LiveShutter.this.ZoomOUTAct.postControlAction())
        {
          localArgumentList = LiveShutter.this.ZoomOUTAct.getOutputArgumentList();
          int i = localArgumentList.size();
          j = 0;
          if (j >= i)
            LiveShutter.bConnectwaitflag = false;
        }
        while (true)
        {
          return;
          Argument localArgument = localArgumentList.getArgument(j);
          String str1 = localArgument.getName();
          String str2 = localArgument.getValue();
          if (str1.equals("CURRENTZOOM"))
          {
            LiveShutter.this.ZoomCount = Integer.parseInt(str2);
            Logger.d("INRY", "ZOOM_OUT REQ 2-1 ZoomCount" + LiveShutter.this.ZoomCount);
            LiveShutter.nDisplayFlag = 30;
            LiveShutter.mHandler.post(LiveShutter.r);
          }
          j++;
          break;
          LiveShutter.bConnectwaitflag = false;
          UPnPStatus localUPnPStatus = LiveShutter.this.ZoomOUTAct.getStatus();
          Logger.e("myLog", "DISPLAY_NETERRORMSG 6" + localUPnPStatus.toString());
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
      }
    }).start();
  }

  public void byebye()
  {
    nDisplayFlag = 45;
    mHandler.postDelayed(r, 10L);
  }

  public void closedata()
  {
    if (bClosing);
    while (true)
    {
      return;
      if (timetask != null)
        timetask.cancel();
      bClosing = true;
      if (conn != null)
        conn.disconnect();
      bsurfacedisplay = false;
      holderremove();
      if (bsaveflag)
        sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
      if (mycontrolpoint != null)
      {
        if (DSCdevice != null)
          mycontrolpoint.unsubscribe(DSCdevice);
        mycontrolpoint.finalize();
      }
      if ((mSH100) && (!bbackhotspot) && (!bVersionFail))
        setHotspotback();
      if (inputstream != null);
      try
      {
        inputstream.close();
        inputstream = null;
        if (bConnect)
        {
          NDKRelease();
          if (bmprunable != null)
            bmprunable.notifyAll();
          if (threadrun != null)
            threadrun.stop();
        }
        bConnect = false;
        if (bappclose)
          continue;
        bappclose = true;
      }
      catch (IOException localIOException)
      {
        while (true)
          localIOException.printStackTrace();
      }
    }
  }

  protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
  {
    super.onActivityResult(paramInt1, paramInt2, paramIntent);
    if (paramInt1 == 1)
    {
      screentype = 1;
      if (paramIntent.getExtras().getInt("data") == 1)
      {
        orientation = getResources().getConfiguration().orientation;
        checkphonecamtype();
        this.bbackflag = true;
        Createchanged();
      }
    }
    while (true)
    {
      return;
      if (bsaveflag)
        sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
      showDialog(15);
      holderremove();
      appclose();
      continue;
      if (paramInt1 != 101)
        continue;
      doAfterUserWifiSetting();
      unregisterSettingCloseReceiver();
    }
  }

  public void onConfigurationChanged(Configuration paramConfiguration)
  {
    super.onConfigurationChanged(paramConfiguration);
    orientation = paramConfiguration.orientation;
    if (this.mChanged)
      switch (paramConfiguration.orientation)
      {
      default:
      case 1:
      case 2:
      }
    while (true)
    {
      return;
      checkphonecamtype();
      Createchanged();
    }
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    Utils.setUseragent(getApplicationContext());
    wifimanager = (WifiManager)getSystemService("wifi");
    Appcontext = getApplicationContext();
    registerDebuggerReceiver();
    if (Utils.isNexusOne())
    {
      this.nZoomGap = 4000;
      this.nAFGap = 4000;
      this.btoastflag = false;
    }
    while (true)
    {
      Process.setThreadPriority(-8);
      bsurfacedisplay = true;
      try
      {
        readNotice();
        DisplayMetrics localDisplayMetrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
        nHolder533 = convertDipToPx(Appcontext, 533);
        nHolder320 = convertDipToPx(Appcontext, 320);
        nHolder196 = convertDipToPx(Appcontext, 196);
        nCanvasY = convertDipToPx(Appcontext, 113);
        nCanvasX = nHolder533 / 2 - nHolder196 / 2;
        this.nZoomland = convertDipToPx(Appcontext, 78);
        this.nZoomport = convertDipToPx(Appcontext, 78);
        this.nZoomWidth = convertDipToPx(Appcontext, 133);
        if (!this.bStart)
        {
          System.gc();
          bgbitmap = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(), 2130837521), nHolder533, nHolder320, true);
          bgbitmap1 = Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(), 2130837522), nHolder320, nHolder533, true);
          getWindow().addFlags(128);
          this.locManager = ((LocationManager)getSystemService("location"));
          localList = this.locManager.getProviders(false);
          str1 = "";
          i = 0;
          int j = localList.size();
          if (i >= j)
          {
            this.locManager.getBestProvider(new Criteria(), true);
            Criteria localCriteria = new Criteria();
            localCriteria.setAccuracy(1);
            this.currentLocation = this.locManager.getLastKnownLocation("network");
            if (this.currentLocation != null)
              break label737;
            String str2 = this.locManager.getBestProvider(localCriteria, true);
            if (str2 == null)
              str2 = "network";
            LocationManager localLocationManager = this.locManager;
            27 local27 = new LocationListener()
            {
              public void onLocationChanged(Location paramLocation)
              {
                LiveShutter.this.currentLocation = paramLocation;
                LiveShutter.this.bNetworkGPS = true;
                Logger.d("myLog", "Changae GPS : " + LiveShutter.this.currentLocation.getLatitude() + "x" + LiveShutter.this.currentLocation.getLongitude());
              }

              public void onProviderDisabled(String paramString)
              {
              }

              public void onProviderEnabled(String paramString)
              {
              }

              public void onStatusChanged(String paramString, int paramInt, Bundle paramBundle)
              {
              }
            };
            localLocationManager.requestLocationUpdates(str2, 0L, 0.0F, local27);
            orientation = getResources().getConfiguration().orientation;
            if (orientation != 2)
              break label745;
            phonecamtype = 3;
            arrayOfInt1 = new int[4][];
            arrayOfInt2 = new int[4][];
            k = 0;
            if (k < 4)
              break label752;
            arrayOfInt1[0][0] = 0;
            arrayOfInt1[0][1] = nCanvasY;
            arrayOfInt1[1][0] = 0;
            arrayOfInt1[1][1] = 0;
            arrayOfInt1[2][0] = 0;
            arrayOfInt1[2][1] = 0;
            arrayOfInt1[3][0] = nCanvasX;
            arrayOfInt1[3][1] = 0;
            arrayOfInt2[0][0] = nHolder320;
            arrayOfInt2[0][1] = nHolder196;
            arrayOfInt2[1][0] = nHolder320;
            arrayOfInt2[1][1] = nHolder533;
            arrayOfInt2[2][0] = nHolder533;
            arrayOfInt2[2][1] = nHolder320;
            arrayOfInt2[3][0] = nHolder196;
            arrayOfInt2[3][1] = nHolder320;
            FFmpegJNI.construct(bgbitmap1, bgbitmap, arrayOfInt1, arrayOfInt2, phonecamtype - 1, 0);
            28 local28 = new Runnable()
            {
              public void run()
              {
                Logger.e("myLog", String.valueOf(LiveShutter.nDisplayFlag));
                switch (LiveShutter.nDisplayFlag)
                {
                default:
                case 1:
                case 22:
                case 2:
                case 3:
                case 4:
                case 5:
                case 10:
                case 19:
                case 11:
                case 12:
                case 7:
                case 29:
                case 17:
                case 18:
                case 23:
                case 31:
                case 6:
                case 8:
                case 9:
                case 13:
                case 107:
                case 14:
                case 15:
                case 16:
                case 32:
                case 24:
                case 21:
                case 25:
                case 26:
                case 20:
                case 27:
                case 28:
                case 30:
                case 40:
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:
                case 47:
                case 33:
                case 34:
                case 48:
                }
                while (true)
                {
                  return;
                  switch (LiveShutter.this.nTimeCount)
                  {
                  default:
                  case 10:
                  case 9:
                  case 8:
                  case 7:
                  case 6:
                  case 5:
                  case 4:
                  case 3:
                  case 2:
                  case 1:
                  }
                  while (true)
                  {
                    if ((LiveShutter.this.nTimeCount != 0) || (!LiveShutter.bshutter))
                      break label683;
                    LiveShutter.access$59(false);
                    LiveShutter.this.timecount.setVisibility(8);
                    LiveShutter.shutter_button.setEnabled(false);
                    LiveShutter.this.bTimer = false;
                    LiveShutter localLiveShutter2 = LiveShutter.this;
                    localLiveShutter2.nTimeCount -= 1;
                    LiveShutter.bsurfacedisplay = false;
                    LiveShutter.nDisplayFlag = 22;
                    LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
                    break;
                    LiveShutter.this.timecount.setImageResource(2130837570);
                    continue;
                    LiveShutter.this.timecount.setImageResource(2130837569);
                    continue;
                    LiveShutter.access$61();
                    LiveShutter.this.timecount.setImageResource(2130837568);
                    continue;
                    LiveShutter.access$61();
                    LiveShutter.this.timecount.setImageResource(2130837567);
                    continue;
                    LiveShutter.access$61();
                    LiveShutter.this.timecount.setImageResource(2130837566);
                    continue;
                    LiveShutter.access$61();
                    LiveShutter.this.timecount.setImageResource(2130837565);
                    continue;
                    LiveShutter.this.timecount.setImageResource(2130837564);
                    continue;
                    LiveShutter.this.timecount.setImageResource(2130837563);
                    continue;
                    LiveShutter.this.timecount.setImageResource(2130837562);
                    continue;
                    LiveShutter.access$61();
                    LiveShutter.this.timecount.setImageResource(2130837561);
                  }
                  label683: continue;
                  LiveShutter.this.showDialog(14);
                  LiveShutter.access$61();
                  LiveShutter.nDisplayFlag = 24;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
                  continue;
                  LiveShutter.this.displaythumbail();
                  LiveShutter.this.nTimerSelect = 0;
                  LiveShutter.this.nTimerData = 0;
                  LiveShutter.m_isFrameRefresh = true;
                  LiveShutter.timer_button.setImageResource(2130837542);
                  if (LiveShutter.orientation == 2)
                  {
                    LiveShutter.shutter_button.setImageResource(2130837578);
                    continue;
                  }
                  LiveShutter.shutter_button.setImageResource(2130837579);
                  continue;
                  LiveShutter.this.buttondisplay(false);
                  continue;
                  LiveShutter.this.batterydisplay();
                  continue;
                  LiveShutter.this.showDialog(3);
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  if (LiveShutter.timetask != null)
                    LiveShutter.timetask.cancel();
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.this.closedata();
                  if (LiveShutter.screentype == 1)
                  {
                    LiveShutter.bclickflag = false;
                    LiveShutter.nDisplayFlag = 44;
                    LiveShutter.mHandler.postDelayed(LiveShutter.r, 3000L);
                    LiveShutter.this.showDialog(1);
                    continue;
                  }
                  LiveShutter.mycontrolpoint.finalize();
                  PlayBack.DisplayPopup();
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.bclickflag = false;
                  LiveShutter.nDisplayFlag = 44;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 3000L);
                  LiveShutter.this.showDialog(11);
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.this.closedata();
                  LiveShutter.bclickflag = false;
                  LiveShutter.nDisplayFlag = 44;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 3000L);
                  LiveShutter.this.showDialog(5);
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.this.showDialog(6);
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.this.showDialog(4);
                  continue;
                  LiveShutter.this.showDialog(12);
                  continue;
                  LiveShutter.this.showDialog(10);
                  continue;
                  LiveShutter.this.showDialog(9);
                  continue;
                  LiveShutter.this.showDialog(7);
                  continue;
                  LiveShutter.this.showDialog(2);
                  continue;
                  LiveShutter.this.afdisplay();
                  continue;
                  LiveShutter.this.bfulldisplay = true;
                  LiveShutter.this.availshotsdisplay();
                  continue;
                  LiveShutter.access$61();
                  continue;
                  LiveShutter.this.timecount.setVisibility(8);
                  continue;
                  Logger.e("INRY", "!!!!!     STOP_SERVICE     !!!!!");
                  LiveShutter.this.stopWifiConnector();
                  LiveShutter.this.runMyControlPoint();
                  continue;
                  if (LiveShutter.this.pro != null)
                  {
                    LiveShutter.this.pro.dismiss();
                    LiveShutter.this.pro = null;
                  }
                  Logger.e("myLog", "DISPLAY_MSGSEARCH dialog");
                  Object[] arrayOfObject = new Object[3];
                  arrayOfObject[0] = LiveShutter.this.getString(2130968613);
                  arrayOfObject[1] = Utils.getMacAddress(LiveShutter.this.getApplicationContext());
                  arrayOfObject[2] = LiveShutter.this.getString(2130968601);
                  String str7 = String.format("[%s] %s\n%s", arrayOfObject);
                  LiveShutter.this.pro = ProgressDialog.show(LiveShutter.this, null, str7, true, true, LiveShutter.this.progDiaCancelListener);
                  LiveShutter.this.pro.setMessage(str7);
                  LiveShutter.this.pro.setCancelable(false);
                  LiveShutter.this.pro.setOnKeyListener(new DialogInterface.OnKeyListener()
                  {
                    public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
                    {
                      if (paramKeyEvent.getKeyCode() == 4)
                        LiveShutter.appclose();
                      for (int i = 1; ; i = 0)
                        return i;
                    }
                  });
                  LiveShutter.this.waitconnectdialog = true;
                  continue;
                  String str6 = LiveShutter.this.getString(2130968602);
                  if (LiveShutter.this.pro == null)
                    continue;
                  LiveShutter.this.pro.setMessage(str6);
                  continue;
                  String str5 = LiveShutter.this.getString(2130968603);
                  if (LiveShutter.this.pro == null)
                    continue;
                  LiveShutter.this.pro.setMessage(str5);
                  continue;
                  String str4 = LiveShutter.this.getString(2130968597);
                  if (LiveShutter.this.pro == null)
                    continue;
                  LiveShutter.this.pro.setMessage(str4);
                  continue;
                  if (LiveShutter.bClosing)
                    continue;
                  String str3 = LiveShutter.this.getString(2130968596);
                  LiveShutter.this.streampro.setMessage(str3);
                  LiveShutter.nDisplayFlag = 40;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
                  continue;
                  if (LiveShutter.this.nFlashData == 0)
                  {
                    LiveShutter.flash_button.setImageResource(2130837527);
                    label1554: if (LiveShutter.this.nTimerSelect != 0)
                      break label1612;
                    LiveShutter.timer_button.setImageResource(2130837542);
                  }
                  while (true)
                  {
                    LiveShutter.this.displayResolutionButton(LiveShutter.this.nPhotoSizeData);
                    break;
                    if (LiveShutter.this.nFlashData != 1)
                      break label1554;
                    LiveShutter.flash_button.setImageResource(2130837526);
                    break label1554;
                    label1612: if (LiveShutter.this.nTimerSelect == 1)
                    {
                      LiveShutter.timer_button.setImageResource(2130837541);
                      continue;
                    }
                    if (LiveShutter.this.nTimerSelect != 2)
                      continue;
                    LiveShutter.timer_button.setImageResource(2130837540);
                  }
                  LiveShutter.this.btoast = false;
                  if (LiveShutter.this.toast == null)
                    continue;
                  LiveShutter.this.toast.cancel();
                  continue;
                  if (LiveShutter.this.nSaveCount == 0)
                  {
                    String str2 = LiveShutter.this.getString(2130968598);
                    LiveShutter.this.streampro.setMessage(str2);
                    LiveShutter.this.mNewHandler.sendEmptyMessageDelayed(35, 20000L);
                    LiveShutter.this.bTimeoutOfSaving = false;
                    new Thread(new Runnable()
                    {
                      public void run()
                      {
                        LiveShutter.nCheckCount = 0;
                        LiveShutter.bshutter = false;
                        LiveShutter.nDisplayFlag = 34;
                        LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
                        while (true)
                        {
                          if (LiveShutter.this.bTimeoutOfSaving)
                          {
                            LiveShutter.nDisplayFlag = 48;
                            LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
                            return;
                          }
                          try
                          {
                            Thread.sleep(100L);
                            LiveShutter.this.mNewHandler.removeMessages(35);
                            if (LiveShutter.FileURL.equals(""))
                              continue;
                          }
                          catch (InterruptedException localInterruptedException)
                          {
                            while (true)
                              localInterruptedException.printStackTrace();
                          }
                        }
                      }
                    }).start();
                  }
                  LiveShutter localLiveShutter1 = LiveShutter.this;
                  localLiveShutter1.nSaveCount = (1 + localLiveShutter1.nSaveCount);
                  continue;
                  String str1 = LiveShutter.this.getString(2130968597);
                  LiveShutter.this.streampro.setMessage(str1);
                  new Thread(new Runnable()
                  {
                    public void run()
                    {
                      LiveShutter.nCheckCount = 0;
                      LiveShutter.bshutter = false;
                      LiveShutter.nDisplayFlag = 34;
                      LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
                      try
                      {
                        do
                          Thread.sleep(100L);
                        while (LiveShutter.FileURL.equals(""));
                        LiveShutter.nDisplayFlag = 48;
                        LiveShutter.mHandler.postDelayed(LiveShutter.r, 1L);
                        return;
                      }
                      catch (InterruptedException localInterruptedException)
                      {
                        while (true)
                          localInterruptedException.printStackTrace();
                      }
                    }
                  }).start();
                  continue;
                  if (LiveShutter.screentype != 1)
                    continue;
                  if (LiveShutter.bshutter)
                  {
                    LiveShutter.access$59(false);
                    if (LiveShutter.this.bTimer)
                    {
                      LiveShutter.shutter_button.setEnabled(true);
                      continue;
                    }
                    LiveShutter.shutter_button.setEnabled(false);
                    continue;
                  }
                  LiveShutter.access$59(true);
                  continue;
                  LiveShutter.this.zoombardisplay();
                  continue;
                  LiveShutter.this.btimercount = false;
                  LiveShutter.bShotting = true;
                  LiveShutter.stop_codec();
                  LiveShutter.cam_rotated_type = LiveShutter.this.cameratype;
                  LiveShutter.this.nSaveCount = 0;
                  if (!LiveShutter.this.bNetworkGPS)
                  {
                    LiveShutter.this.Shot_DSC();
                    continue;
                  }
                  LiveShutter.this.ShotWithGPS_DSC();
                  continue;
                  LiveShutter.this.GetLiveStream();
                  continue;
                  LiveShutter.this.Thumbnaildown();
                  continue;
                  if (LiveShutter.bclickflag)
                    continue;
                  if (LiveShutter.bsaveflag)
                    LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
                  LiveShutter.this.showDialog(15);
                  LiveShutter.access$22();
                  continue;
                  if (LiveShutter.this.bpopupflag)
                    continue;
                  Logger.d("myLog", "RUN_EXIT_BYEBYE+++++++");
                  if (LiveShutter.timetask != null)
                    LiveShutter.timetask.cancel();
                  LiveShutter.this.bpopupflag = true;
                  LiveShutter.this.closedata();
                  if (LiveShutter.screentype == 1)
                  {
                    LiveShutter.bclickflag = false;
                    LiveShutter.nDisplayFlag = 44;
                    LiveShutter.mHandler.postDelayed(LiveShutter.r, 3000L);
                    LiveShutter.this.showDialog(1);
                    continue;
                  }
                  LiveShutter.mycontrolpoint.finalize();
                  PlayBack.DisplayPopup();
                  continue;
                  LiveShutter.appclose();
                  continue;
                  LiveShutter.access$61();
                  LiveShutter.this.showDialog(14);
                  LiveShutter.nDisplayFlag = 24;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 100L);
                  continue;
                  LiveShutter.this.showDialog(16);
                  continue;
                  LiveShutter.this.buttondisplay(true);
                  continue;
                  LiveShutter.this.initcodec();
                  if (LiveShutter.this.pro != null)
                  {
                    LiveShutter.this.pro.dismiss();
                    LiveShutter.this.pro = null;
                  }
                  if ((LiveShutter.this.streampro == null) || (!LiveShutter.this.streampro.isShowing()))
                    continue;
                  LiveShutter.this.streampro.dismiss();
                  LiveShutter.this.removeDialog(14);
                }
              }
            };
            r = local28;
          }
        }
        else
        {
          bClosing = false;
          Logger.e("myLog", "LiveShutter oncreate()");
          if (this.mNotice)
            break label774;
          showDialog(18);
          return;
          this.nZoomGap = 2000;
          this.nAFGap = 2000;
          this.btoastflag = true;
        }
      }
      catch (IOException localIOException)
      {
        while (true)
        {
          List localList;
          int i;
          int[][] arrayOfInt1;
          int[][] arrayOfInt2;
          int k;
          localIOException.printStackTrace();
          continue;
          String str1 = str1 + "Provider " + i + " : " + (String)localList.get(i) + "\n";
          i++;
          continue;
          label737: this.bNetworkGPS = true;
          continue;
          label745: phonecamtype = 1;
          continue;
          label752: arrayOfInt1[k] = new int[2];
          arrayOfInt2[k] = new int[2];
          k++;
          continue;
          label774: startAPSearch();
        }
      }
    }
  }

  protected Dialog onCreateDialog(int paramInt)
  {
    Object localObject;
    switch (paramInt)
    {
    case 19:
    default:
      localObject = null;
    case 18:
    case 3:
    case 1:
    case 11:
    case 16:
    case 2:
    case 13:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 10:
    case 9:
    case 12:
    case 14:
    case 15:
    case 17:
    case 20:
    }
    while (true)
    {
      return localObject;
      localObject = getCustomDialog();
      continue;
      this.nCurShowDlg = 3;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968577).setMessage(2130968591).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0));
          for (int i = 1; ; i = 0)
            return i;
        }
      }).create();
      continue;
      this.nCurShowDlg = 1;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968580).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          LiveShutter.bclickflag = true;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.access$22();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 16;
      if (bClosing)
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968604).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          LiveShutter.bclickflag = true;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          Logger.d("myLog", "exit 66");
          LiveShutter.this.showDialog(15);
          LiveShutter.this.holderremove();
          LiveShutter.appclose();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 2;
      if (bClosing)
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968581).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (!LiveShutter.this.bbatteryexit)
          {
            if (LiveShutter.bsaveflag)
              LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
            LiveShutter.this.showDialog(15);
            LiveShutter.this.holderremove();
            LiveShutter.appclose();
          }
          while (true)
          {
            return;
            LiveShutter.systemExit();
          }
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 13;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968604).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.access$22();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 4;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968582).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.access$22();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 5;
      if (!this.bStart)
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968583).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          LiveShutter.bclickflag = true;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.access$22();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 6;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968584).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.access$22();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 7;
      Logger.e("LiveShutter", "MSGBOX_QUESTIONEXIT is running!!!");
      if ((bClosing) || (!this.bStart))
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837575).setTitle(2130968578).setMessage(2130968586).setPositiveButton(2130968594, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.this.holderremove();
          LiveShutter.appclose();
        }
      }).setNegativeButton(2130968595, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
        }
      }).create();
      continue;
      this.nCurShowDlg = 8;
      if (bClosing)
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968585).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.this.holderremove();
          LiveShutter.appclose();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 10;
      if ((bClosing) || (!this.bStart))
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968578).setMessage(2130968588).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.bsaveflag)
            LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
          LiveShutter.this.showDialog(15);
          LiveShutter.this.holderremove();
          LiveShutter.appclose();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          int i;
          if ((paramInt == 84) && (paramKeyEvent.getRepeatCount() == 0))
            i = 1;
          while (true)
          {
            return i;
            if ((paramInt == 4) && (paramKeyEvent.getRepeatCount() == 0))
            {
              i = 1;
              continue;
            }
            i = 0;
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 9;
      if ((bClosing) || (!this.bStart))
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968577).setMessage(2130968589).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          if (LiveShutter.bClosing);
          while (true)
          {
            return;
            LiveShutter.this.nCurShowDlg = -1;
            if (!LiveShutter.this.bexitflag)
              continue;
            if (LiveShutter.bsaveflag)
              LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
            LiveShutter.this.showDialog(15);
            LiveShutter.this.holderremove();
            LiveShutter.appclose();
          }
        }
      }).create();
      continue;
      this.nCurShowDlg = 12;
      if ((bClosing) || (!this.bStart))
      {
        localObject = null;
        continue;
      }
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968577).setMessage(2130968590).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.nCurShowDlg = -1;
          if (LiveShutter.this.bexitflag)
          {
            if (LiveShutter.bsaveflag)
              LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
            LiveShutter.this.showDialog(15);
            LiveShutter.this.holderremove();
            LiveShutter.appclose();
          }
        }
      }).create();
      continue;
      if ((bClosing) || (!this.bStart))
      {
        localObject = null;
        continue;
      }
      String str2 = getString(2130968596);
      this.streampro = new ProgressDialog(this);
      this.streampro.setMessage(str2);
      this.streampro.setIndeterminate(true);
      this.streampro.setProgressStyle(0);
      this.streampro.setCancelable(false);
      this.streampro.setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          if (paramKeyEvent.getKeyCode() == 84);
          for (int i = 1; ; i = 0)
            return i;
        }
      });
      localObject = this.streampro;
      continue;
      if (this.proap != null)
      {
        this.proap.dismiss();
        this.proap = null;
      }
      if (this.pro != null)
      {
        this.pro.dismiss();
        this.pro = null;
      }
      String str1 = getString(2130968605);
      this.streampro = new ProgressDialog(this);
      this.streampro.setMessage(str1);
      this.streampro.setIndeterminate(true);
      this.streampro.setProgressStyle(0);
      this.streampro.setCancelable(false);
      this.streampro.setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          if (paramKeyEvent.getKeyCode() == 84);
          for (int i = 1; ; i = 0)
            return i;
        }
      });
      localObject = this.streampro;
      continue;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968610).setMessage(2130968611).setPositiveButton("SH100", new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.mSH100 = true;
          LiveShutter.this.DoCheckAPMode();
        }
      }).setNegativeButton(2130968612, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.mSH100 = false;
          LiveShutter.this.DoCheckAPMode();
        }
      }).setOnKeyListener(new DialogInterface.OnKeyListener()
      {
        public boolean onKey(DialogInterface paramDialogInterface, int paramInt, KeyEvent paramKeyEvent)
        {
          switch (paramInt)
          {
          default:
          case 84:
          case 4:
          }
          while (true)
          {
            for (int i = 0; ; i = 1)
              return i;
            LiveShutter.this.finish();
          }
        }
      }).create();
      continue;
      localObject = new AlertDialog.Builder(this).setIcon(2130837558).setTitle(2130968614).setMessage(2130968615).setCancelable(false).setPositiveButton(2130968592, new DialogInterface.OnClickListener()
      {
        public void onClick(DialogInterface paramDialogInterface, int paramInt)
        {
          LiveShutter.this.startWifiConnector();
        }
      }).create();
    }
  }

  protected void onDestroy()
  {
    super.onDestroy();
    System.out.println("onDestroy()");
    Logger.i("LiveShutter", "onDestroy()");
    systemExit();
  }

  public boolean onKeyDown(int paramInt, KeyEvent paramKeyEvent)
  {
    int i;
    switch (paramInt)
    {
    default:
      i = 1;
    case 84:
    case 4:
    }
    while (true)
    {
      return i;
      i = 1;
      continue;
      if ((nReadCount > 1) && (bConnect))
      {
        i = 1;
        continue;
      }
      nDisplayFlag = 23;
      mHandler.postDelayed(r, 10L);
      i = 1;
    }
  }

  public boolean onKeyUp(int paramInt, KeyEvent paramKeyEvent)
  {
    switch (paramInt)
    {
    case 84:
    }
    return true;
  }

  public void onPause()
  {
    super.onPause();
    bResumeStart = false;
    if (!this.bStart)
    {
      if (bappclose)
        break label118;
      if (screentype == 1)
      {
        if (this.nCurShowDlg != -1)
          removeDialog(this.nCurShowDlg);
        if (bsaveflag)
          sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
        holderremove();
        Logger.d("myLog", "appclose() call 1");
        new Thread(new Runnable()
        {
          Handler h = new Handler();

          public void run()
          {
            if (LiveShutter.bConnectwaitflag)
            {
              Logger.e("myLog", "onPause() bConnectwaitflag : " + LiveShutter.bConnectwaitflag);
              this.h.postDelayed(this, 300L);
            }
            while (true)
            {
              return;
              LiveShutter.nDisplayFlag = 46;
              LiveShutter.mHandler.post(LiveShutter.r);
            }
          }
        }).start();
      }
    }
    while (true)
    {
      return;
      label118: systemExit();
    }
  }

  protected void onResume()
  {
    super.onResume();
    if (bClosing)
    {
      if (this.pro != null)
      {
        this.pro.dismiss();
        this.pro = null;
      }
      if (this.proap != null)
      {
        this.proap.dismiss();
        this.proap = null;
      }
      showDialog(15);
    }
    while (true)
    {
      return;
      if (bshutter)
      {
        bResumeStart = true;
        showDialog(15);
        continue;
      }
    }
  }

  public void runMyControlPoint()
  {
    Logger.e("myLog", "00 ---- this is runMyControlPoint ---- 00");
    if (bForshow)
    {
      if (this.proap != null)
      {
        this.proap.dismiss();
        this.proap = null;
      }
      nDisplayFlag = 14;
      mHandler.post(r);
      mycontrolpoint = MyControlPoint.getInstance();
      mycontrolpoint.SetMain(this);
      this.nConnectCount = 0;
      return;
    }
    netConfig = new WifiConfiguration();
    this.nConnectCount = 0;
    String str;
    if (mSH100)
    {
      OldAPName = wifiConfig.SSID;
      if (OldAPName.startsWith("SH100_"))
        break label277;
      str = "SH100_" + OldAPName;
      label129: if (str.length() > 32)
        str = str.substring(0, 31);
      netConfig = wifiConfig;
      netConfig.SSID = str;
      if (WifiApState == 3)
        break label305;
    }
    label277: label305: for (boolean bool = setWifiApInfo(netConfig, false); ; bool = setWifiApInfo(netConfig, true))
    {
      if (bool)
        bwificonfigchange = true;
      unregisterReceiver(this.wifiStateChangedReceiver);
      Logger.d("myLog", " this is runrun ---- 11");
      if (this.proap != null)
      {
        this.proap.dismiss();
        this.proap = null;
      }
      Logger.e("myLog", " this is runrun ---- 22");
      if (mSH100)
      {
        nDisplayFlag = 14;
        mHandler.post(r);
      }
      mycontrolpoint = MyControlPoint.getInstance();
      mycontrolpoint.SetMain(this);
      this.nConnectCount = 0;
      this.totalproaprun = (1 + this.totalproaprun);
      break;
      str = OldAPName;
      OldAPName = OldAPName.substring("SH100_".length(), OldAPName.length());
      break label129;
    }
  }

  public void surfaceChanged(SurfaceHolder paramSurfaceHolder, int paramInt1, int paramInt2, int paramInt3)
  {
    Logger.e("INRY", new java.lang.Throwable().getStackTrace()[0].getFileName() + "(" + String.valueOf(new java.lang.Throwable().getStackTrace()[0].getLineNumber()) + ") - " + "surfaceChanged() - width:" + String.valueOf(paramInt2) + ", height:" + String.valueOf(paramInt3));
    FFmpegJNI.request(FFmpegJNI.Command.SURFACE_CHANGED, paramSurfaceHolder);
  }

  public void surfaceCreated(SurfaceHolder paramSurfaceHolder)
  {
    if (!this.bStart)
      this.bStart = true;
    initLayout();
    displaybatterylevel();
    bsurfaceflag = true;
    if (!this.bStart)
    {
      shutterbutton(false);
      shutter_button.setEnabled(false);
    }
    if (bmImg == null)
    {
      playback_button.setVisibility(8);
      this.thumbnail.setVisibility(8);
      this.back_layout.setVisibility(8);
      this.memoryfull.setVisibility(8);
      this.textmemory.setVisibility(8);
      this.bfulldisplay = false;
      availshotsdisplay();
      afgonedisplay();
      if (!this.btimercount)
        this.timecount.setVisibility(8);
      batterydisplay();
      zoombardisplay();
      if (this.bStart)
      {
        bbuttondisplay = false;
        nCheckCount = 0;
        buttondisplay(true);
      }
      if (this.nFlashData != 0)
        break label365;
      flash_button.setImageResource(2130837527);
      label164: if (this.nTimerData != 0)
        break label385;
      timer_button.setImageResource(2130837542);
      label180: displayResolutionButton(this.nPhotoSizeData);
      shutterbutton(false);
      if (bshutter)
      {
        shutterbutton(false);
        if (!this.bTimer)
          break label425;
        shutter_button.setEnabled(true);
      }
      label216: if (!this.bbackflag)
        break label435;
      bsurfacedisplay = true;
      this.bbackflag = false;
      nDisplayFlag = 28;
      mHandler.postDelayed(r, 1000L);
    }
    while (true)
    {
      flash_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          switch (paramMotionEvent.getAction())
          {
          default:
            i = 0;
            return i;
          case 0:
            if (LiveShutter.this.nFlashData == 0)
              LiveShutter.flash_button.setImageResource(2130837550);
            while (true)
            {
              LiveShutter.nCheckCount = 0;
              LiveShutter.this.buttondisplay(true);
              i = 1;
              break;
              if (LiveShutter.this.nFlashData != 1)
                continue;
              LiveShutter.flash_button.setImageResource(2130837548);
            }
          case 1:
          }
          label110: long l;
          if (LiveShutter.this.nFlashData == 0)
          {
            LiveShutter.flash_button.setImageResource(2130837549);
            l = System.currentTimeMillis();
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            if (LiveShutter.bKeyFlag)
            {
              if (l - LiveShutter.this.clecktime <= 500L)
                break label191;
              LiveShutter.this.clecktime = l;
              LiveShutter.this.DialogFlashSelectOption();
            }
          }
          while (true)
          {
            i = 1;
            break;
            if (LiveShutter.this.nFlashData != 1)
              break label110;
            LiveShutter.flash_button.setImageResource(2130837547);
            break label110;
            label191: LiveShutter.this.clecktime = l;
          }
        }
      });
      timer_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          switch (paramMotionEvent.getAction())
          {
          default:
            i = 0;
            return i;
          case 0:
            if (LiveShutter.this.nTimerData == 0)
              LiveShutter.timer_button.setImageResource(2130837617);
            while (true)
            {
              LiveShutter.nCheckCount = 0;
              LiveShutter.this.buttondisplay(true);
              i = 1;
              break;
              if (LiveShutter.this.nTimerData == 1)
              {
                LiveShutter.timer_button.setImageResource(2130837615);
                continue;
              }
              if (LiveShutter.this.nTimerData != 2)
                continue;
              LiveShutter.timer_button.setImageResource(2130837613);
            }
          case 1:
          }
          label132: long l;
          if (LiveShutter.this.nTimerData == 0)
          {
            LiveShutter.timer_button.setImageResource(2130837616);
            l = System.currentTimeMillis();
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            if (LiveShutter.bKeyFlag)
            {
              if (l - LiveShutter.this.clecktime <= 500L)
                break label235;
              LiveShutter.this.clecktime = l;
              LiveShutter.this.DialogTimerSelectOption();
            }
          }
          while (true)
          {
            i = 1;
            break;
            if (LiveShutter.this.nTimerData == 1)
            {
              LiveShutter.timer_button.setImageResource(2130837614);
              break label132;
            }
            if (LiveShutter.this.nTimerData != 2)
              break label132;
            LiveShutter.timer_button.setImageResource(2130837612);
            break label132;
            label235: LiveShutter.this.clecktime = l;
          }
        }
      });
      photosize_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          switch (paramMotionEvent.getAction())
          {
          default:
          case 0:
            for (i = 0; ; i = 1)
            {
              return i;
              LiveShutter.this.displayResolutionButton(LiveShutter.this.nPhotoSizeData, true);
              LiveShutter.nCheckCount = 0;
              LiveShutter.this.buttondisplay(true);
            }
          case 1:
          }
          LiveShutter.this.displayResolutionButton(LiveShutter.this.nPhotoSizeData, false);
          long l = System.currentTimeMillis();
          LiveShutter.nCheckCount = 0;
          LiveShutter.this.buttondisplay(true);
          if (LiveShutter.bKeyFlag)
          {
            if (l - LiveShutter.this.clecktime <= 500L)
              break label141;
            LiveShutter.this.clecktime = l;
            LiveShutter.this.DialogPhotosizeSelectOption();
          }
          while (true)
          {
            i = 1;
            break;
            label141: LiveShutter.this.clecktime = l;
          }
        }
      });
      shutter_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i = (int)paramMotionEvent.getX();
          int j = (int)paramMotionEvent.getY();
          int k;
          switch (paramMotionEvent.getAction())
          {
          default:
            k = 0;
          case 0:
          case 1:
          }
          while (true)
          {
            return k;
            if (System.currentTimeMillis() - LiveShutter.this.shotcanceltime > LiveShutter.this.nAFGap)
            {
              if (!LiveShutter.bConnectwaitflag)
              {
                if (LiveShutter.orientation == 2)
                  LiveShutter.shutter_button.setImageResource(2130837580);
                while (true)
                {
                  LiveShutter.nCheckCount = 0;
                  LiveShutter.this.buttondisplay(true);
                  if (!LiveShutter.bshutter)
                  {
                    LiveShutter.this.bshotrunflag = true;
                    LiveShutter.nShutterDnUp = 0;
                    LiveShutter.this.shotcanceltime = System.currentTimeMillis();
                    LiveShutter.this.MULTIAF_DSC();
                  }
                  k = 1;
                  break;
                  LiveShutter.shutter_button.setImageResource(2130837581);
                }
              }
              if (LiveShutter.orientation == 2)
                LiveShutter.shutter_button.setImageResource(2130837578);
              while (true)
              {
                LiveShutter.this.bshotrunflag = false;
                break;
                LiveShutter.shutter_button.setImageResource(2130837579);
              }
            }
            if (LiveShutter.orientation == 2)
              LiveShutter.shutter_button.setImageResource(2130837578);
            while (true)
            {
              LiveShutter.this.bshotrunflag = false;
              break;
              LiveShutter.shutter_button.setImageResource(2130837579);
            }
            if (LiveShutter.orientation == 2)
              LiveShutter.shutter_button.setImageResource(2130837578);
            while (true)
            {
              LiveShutter.nCheckCount = 0;
              LiveShutter.this.buttondisplay(true);
              if ((!LiveShutter.bshutter) && (LiveShutter.this.bshotrunflag))
              {
                LiveShutter.nDisplayFlag = 9;
                LiveShutter.mHandler.post(LiveShutter.r);
              }
              if ((i >= 0) && (j >= 0))
                break label317;
              LiveShutter.nShutterDnUp = -1;
              k = 1;
              break;
              LiveShutter.shutter_button.setImageResource(2130837579);
            }
            label317: if (LiveShutter.orientation == 2)
            {
              if ((i > 72) || (j > 151))
              {
                LiveShutter.nShutterDnUp = -1;
                k = 1;
                continue;
              }
            }
            else if ((i > 151) || (j > 72))
            {
              LiveShutter.nShutterDnUp = -1;
              k = 1;
              continue;
            }
            LiveShutter.nShutterDnUp = 1;
            if ((!LiveShutter.bshutter) || (!LiveShutter.this.bTimer))
              break;
            LiveShutter.this.nTimeCount = -1;
            LiveShutter.this.bTimer = false;
            LiveShutter.access$59(true);
            LiveShutter.this.timecount.setVisibility(8);
            LiveShutter.bshutter = false;
            LiveShutter.this.bshotrunflag = false;
            LiveShutter.access$61();
            k = 1;
          }
          if (LiveShutter.this.bshotrunflag)
          {
            LiveShutter.bshutter = true;
            LiveShutter.access$59(false);
            switch (LiveShutter.this.nTimerData)
            {
            default:
            case 0:
            case 1:
            case 2:
            }
          }
          while (true)
          {
            k = 1;
            break;
            LiveShutter.shutter_button.setEnabled(false);
            LiveShutter.bsurfacedisplay = false;
            new Thread(new Runnable()
            {
              public void run()
              {
                while (true)
                {
                  if (!LiveShutter.bConnectwaitflag)
                  {
                    LiveShutter.nDisplayFlag = 47;
                    LiveShutter.mHandler.post(LiveShutter.r);
                    return;
                  }
                  Logger.e("myLog", "shutter_press UP ,bConnectwaitflag" + LiveShutter.bConnectwaitflag);
                  try
                  {
                    Thread.sleep(500L);
                  }
                  catch (InterruptedException localInterruptedException)
                  {
                    localInterruptedException.printStackTrace();
                  }
                }
              }
            }).start();
            continue;
            LiveShutter.this.timerdisplay();
          }
        }
      });
      this.back_layout.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          if (LiveShutter.bshutter)
            i = 1;
          while (true)
          {
            return i;
            switch (paramMotionEvent.getAction())
            {
            default:
              i = 0;
              break;
            case 0:
              LiveShutter.nCheckCount = 0;
              i = 1;
              break;
            case 1:
              LiveShutter.nCheckCount = 0;
              if (LiveShutter.bKeyFlag)
                LiveShutter.this.loadingdisplay();
              i = 1;
            }
          }
        }
      });
      zoomout_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          switch (paramMotionEvent.getAction())
          {
          default:
            i = 0;
          case 0:
          case 1:
          }
          while (true)
          {
            return i;
            long l = System.currentTimeMillis();
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            if (l - LiveShutter.this.zoomtime > LiveShutter.this.nZoomGap)
            {
              LiveShutter.zoomout_button.setImageResource(2130837625);
              if ((LiveShutter.this.ZoomCount != 0) && (LiveShutter.bKeyFlag))
              {
                LiveShutter.this.btoast = false;
                LiveShutter.nDisplayFlag = 25;
                LiveShutter.mHandler.postDelayed(LiveShutter.r, LiveShutter.this.nZoomGap - 2);
                LiveShutter.this.zoomtime = l;
                LiveShutter.this.ZoomOUT_DSC();
              }
            }
            label173: 
            do
            {
              do
              {
                i = 1;
                break;
                if ((LiveShutter.this.ZoomCount == 0) || (!LiveShutter.bKeyFlag))
                  break label291;
                LiveShutter.zoomout_button.setImageResource(2130837624);
                LiveShutter.nCheckCount = 0;
                LiveShutter.this.buttondisplay(true);
              }
              while (!LiveShutter.this.btoastflag);
              if (LiveShutter.this.toast != null)
                continue;
              String str = LiveShutter.this.getString(2130968606);
              LiveShutter.this.toast = Toast.makeText(LiveShutter.Appcontext, str, 0);
            }
            while (LiveShutter.this.btoast);
            if (LiveShutter.orientation == 2)
              LiveShutter.this.toast.setGravity(81, 0, LiveShutter.convertDipToPx(LiveShutter.Appcontext, 43));
            while (true)
            {
              LiveShutter.this.btoast = true;
              LiveShutter.this.toast.show();
              break;
              label291: if (LiveShutter.this.ZoomCount != 0)
                break label173;
              LiveShutter.zoomout_button.setImageResource(2130837625);
              break label173;
              LiveShutter.this.toast.setGravity(81, 0, LiveShutter.convertDipToPx(LiveShutter.Appcontext, 150));
            }
            LiveShutter.zoomout_button.setImageResource(2130837624);
            i = 1;
          }
        }
      });
      zoomin_button.setOnTouchListener(new View.OnTouchListener()
      {
        public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
        {
          int i;
          switch (paramMotionEvent.getAction())
          {
          default:
            i = 0;
          case 0:
          case 1:
          }
          while (true)
          {
            return i;
            long l = System.currentTimeMillis();
            LiveShutter.nCheckCount = 0;
            LiveShutter.this.buttondisplay(true);
            if (l - LiveShutter.this.zoomtime > LiveShutter.this.nZoomGap)
            {
              LiveShutter.zoomin_button.setImageResource(2130837622);
              if ((LiveShutter.this.ZoomCount != LiveShutter.this.ZoomInfoMax - 1) && (LiveShutter.bKeyFlag))
              {
                LiveShutter.this.btoast = false;
                LiveShutter.nDisplayFlag = 26;
                LiveShutter.mHandler.postDelayed(LiveShutter.r, LiveShutter.this.nZoomGap - 2);
                LiveShutter.this.zoomtime = l;
                LiveShutter.this.ZoomIN_DSC();
              }
            }
            label182: 
            do
            {
              do
              {
                i = 1;
                break;
                if ((LiveShutter.this.ZoomCount == 0) || (!LiveShutter.bKeyFlag))
                  break label300;
                LiveShutter.zoomin_button.setImageResource(2130837621);
                LiveShutter.nCheckCount = 0;
                LiveShutter.this.buttondisplay(true);
              }
              while (!LiveShutter.this.btoastflag);
              if (LiveShutter.this.toast != null)
                continue;
              String str = LiveShutter.this.getString(2130968606);
              LiveShutter.this.toast = Toast.makeText(LiveShutter.Appcontext, str, 0);
            }
            while (LiveShutter.this.btoast);
            if (LiveShutter.orientation == 2)
              LiveShutter.this.toast.setGravity(81, 0, LiveShutter.convertDipToPx(LiveShutter.Appcontext, 43));
            while (true)
            {
              LiveShutter.this.btoast = true;
              LiveShutter.this.toast.show();
              break;
              label300: if (LiveShutter.this.ZoomCount != 0)
                break label182;
              LiveShutter.zoomin_button.setImageResource(2130837622);
              break label182;
              LiveShutter.this.toast.setGravity(81, 0, LiveShutter.convertDipToPx(LiveShutter.Appcontext, 150));
            }
            LiveShutter.zoomin_button.setImageResource(2130837621);
            i = 1;
          }
        }
      });
      FFmpegJNI.request(FFmpegJNI.Command.SURFACE_CREATED, paramSurfaceHolder);
      return;
      displaythumbail();
      break;
      label365: if (this.nFlashData != 1)
        break label164;
      flash_button.setImageResource(2130837526);
      break label164;
      label385: if (this.nTimerData == 1)
      {
        timer_button.setImageResource(2130837541);
        break label180;
      }
      if (this.nTimerData != 2)
        break label180;
      timer_button.setImageResource(2130837540);
      break label180;
      label425: shutter_button.setEnabled(false);
      break label216;
      label435: if (bshutter)
        continue;
      shutterbutton(true);
    }
  }

  public void surfaceDestroyed(SurfaceHolder paramSurfaceHolder)
  {
    FFmpegJNI.request(FFmpegJNI.Command.SURFACE_DESTROYED, paramSurfaceHolder);
  }

  public void timerdisplay()
  {
    this.btimercount = true;
    if (this.nTimerData > 0)
    {
      this.bTimer = true;
      if (this.nTimerData != 1)
        break label49;
      this.timecount.setImageResource(2130837562);
      this.nTimeCount = 3;
    }
    while (true)
    {
      this.timecount.setVisibility(0);
      return;
      label49: if (this.nTimerData != 2)
        continue;
      this.timecount.setImageResource(2130837570);
      this.nTimeCount = 11;
    }
  }

  public void updateTimerDisplay()
  {
    this.nTimeCount -= 1;
    nDisplayFlag = 1;
    mHandler.postDelayed(r, 2L);
  }

  public class MyPhoneStateListener extends PhoneStateListener
  {
    public MyPhoneStateListener()
    {
    }

    public void onCallStateChanged(int paramInt, String paramString)
    {
      switch (paramInt)
      {
      case 0:
      default:
      case 1:
      }
      while (true)
      {
        return;
        if (LiveShutter.bsaveflag)
          LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
        LiveShutter.this.showDialog(15);
        LiveShutter.this.holderremove();
        LiveShutter.appclose();
      }
    }
  }

  public class PatchInputStream extends FilterInputStream
  {
    public PatchInputStream(InputStream arg2)
    {
      super();
    }

    public long skip(long paramLong)
      throws IOException
    {
      long l1 = 0L;
      while (true)
      {
        if (l1 >= paramLong);
        long l2;
        do
        {
          return l1;
          l2 = this.in.skip(paramLong - l1);
        }
        while (l1 == 0L);
        l1 += l2;
      }
    }
  }

  class ShowListener
    implements View.OnClickListener
  {
    final View mTarget;

    ShowListener(View arg2)
    {
      Object localObject;
      this.mTarget = localObject;
    }

    public void onClick(View paramView)
    {
      LiveShutter.nCheckCount = 0;
      LiveShutter.this.buttondisplay(LiveShutter.bbuttondisplay);
    }
  }

  class TimerRun extends TimerTask
  {
    TimerRun()
    {
    }

    public void run()
    {
      if (LiveShutter.mSH100)
      {
        Logger.d("INRY", "runMyControlPoint 1");
        LiveShutter.this.runMyControlPoint();
      }
    }
  }

  class TimerTaskRun extends TimerTask
  {
    TimerTaskRun()
    {
    }

    public void run()
    {
      Logger.e("myLog", "CONFIG_ARCH_S5C7380_BCM4325");
      LiveShutter localLiveShutter1 = LiveShutter.this;
      localLiveShutter1.m_jiffies = (1 + localLiveShutter1.m_jiffies);
      if ((!LiveShutter.this.StreamURL.equals("")) && (LiveShutter.this.m_jiffies % 10 == 0))
      {
        LiveShutter.this.m_prevFrameCount = LiveShutter.this.m_curFrameCount;
        LiveShutter.this.m_curFrameCount = FFmpegJNI.request(FFmpegJNI.Command.FRAME_COUNT_GET, 0, 0);
        if ((LiveShutter.m_isFrameRefresh) && (LiveShutter.this.m_curFrameCount > 0) && (LiveShutter.this.m_prevFrameCount == LiveShutter.this.m_curFrameCount))
        {
          Logger.e("myLog", "No frame refresh! : " + String.valueOf(LiveShutter.this.m_curFrameCount));
          LiveShutter.nDisplayFlag = 10;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
        Logger.d("myLog", "!!!FRAME!!! m_isFrameRefresh=" + LiveShutter.m_isFrameRefresh + ", m_curFrameCount=" + LiveShutter.this.m_curFrameCount + ", m_prevFrameCount=" + LiveShutter.this.m_prevFrameCount);
      }
      if (LiveShutter.bsurfaceflag)
        LiveShutter.this.checkbattery();
      LiveShutter.nCheckCount = 1 + LiveShutter.nCheckCount;
      if (LiveShutter.bConnectwaitflag)
      {
        LiveShutter localLiveShutter6 = LiveShutter.this;
        localLiveShutter6.nWaitCount = (1 + localLiveShutter6.nWaitCount);
      }
      if (!LiveShutter.bConnect)
      {
        LiveShutter localLiveShutter5 = LiveShutter.this;
        localLiveShutter5.nConnectCount = (1 + localLiveShutter5.nConnectCount);
      }
      while (true)
      {
        if ((LiveShutter.bConnect) && (LiveShutter.nCheckCount == 5))
        {
          LiveShutter.nDisplayFlag = 3;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
        }
        if ((LiveShutter.nCheckCount == 600) && (LiveShutter.bsurfacedisplay) && (LiveShutter.bConnect))
        {
          Logger.e("myLog", "nCheckCount == EXIT_TIME && bsurfacedisplay && bConnect");
          LiveShutter.timetask.cancel();
          if (LiveShutter.nReadCount == 1)
          {
            LiveShutter.nDisplayFlag = 11;
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          }
        }
        else
        {
          label372: if ((LiveShutter.this.nWaitCount == 30) && (LiveShutter.bConnect))
          {
            Logger.e("myLog", "nWaitCount == CONNECT_WAIT && bConnect");
            if (LiveShutter.timetask != null)
              LiveShutter.timetask.cancel();
            if (LiveShutter.this.streampro != null)
            {
              LiveShutter.this.streampro.dismiss();
              LiveShutter.this.streampro = null;
              LiveShutter.this.removeDialog(14);
            }
            if (LiveShutter.inputstream == null);
          }
        }
        try
        {
          LiveShutter.inputstream.close();
          if (LiveShutter.conn != null)
            LiveShutter.conn.disconnect();
          LiveShutter.this.closedata();
          LiveShutter.nDisplayFlag = 12;
          LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
          if ((LiveShutter.this.bTimer) && (LiveShutter.this.nTimeCount > 0))
            LiveShutter.this.updateTimerDisplay();
          if ((LiveShutter.nReadCount == 20) && (LiveShutter.bConnect))
          {
            Logger.e("myLog", "nReadCount == DISCONNECT_TIME && bConnect");
            LiveShutter.timetask.cancel();
            if (LiveShutter.this.streampro != null)
            {
              LiveShutter.this.streampro.dismiss();
              LiveShutter.this.streampro = null;
              LiveShutter.this.removeDialog(14);
            }
            if (LiveShutter.inputstream == null);
          }
        }
        catch (IOException localIOException2)
        {
          try
          {
            LiveShutter.inputstream.close();
            if (LiveShutter.conn != null)
              LiveShutter.conn.disconnect();
            LiveShutter.this.closedata();
            LiveShutter.nDisplayFlag = 19;
            LiveShutter.mHandler.post(LiveShutter.r);
            if ((LiveShutter.this.nConnectCount == 180) && (!LiveShutter.bConnect))
            {
              Logger.e("myLog", "nConnectCount == CONNECT_TIME && !bConnect");
              if (LiveShutter.timetask != null)
                LiveShutter.timetask.cancel();
              if (LiveShutter.inputstream == null);
            }
          }
          catch (IOException localIOException2)
          {
            try
            {
              while (true)
              {
                LiveShutter.inputstream.close();
                if (LiveShutter.conn != null)
                  LiveShutter.conn.disconnect();
                LiveShutter.this.closedata();
                LiveShutter.nDisplayFlag = 7;
                LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
                if (LiveShutter.DSCdevice == null)
                {
                  if (!LiveShutter.mSH100)
                    break label1127;
                  Logger.d("myLog", "timetask is run --- 2    " + LiveShutter.mSH100);
                  if ((LiveShutter.bapsett) && (!LiveShutter.bVersionFail) && (!LiveShutter.bClosing))
                  {
                    if (!LiveShutter.bForshow)
                      break label906;
                    if (LiveShutter.mSH100)
                    {
                      Logger.d("INRY", "runMyControlPoint 2");
                      LiveShutter.this.runMyControlPoint();
                    }
                    LiveShutter.bapsett = false;
                  }
                }
                return;
                LiveShutter.this.nConnectCount = 0;
                break;
                LiveShutter.this.closedata();
                if (LiveShutter.bsaveflag)
                  LiveShutter.this.sendBroadcast(new Intent("android.intent.action.MEDIA_MOUNTED", Uri.parse("file://" + Environment.getExternalStorageDirectory())));
                LiveShutter.access$22();
                break label372;
                localIOException3 = localIOException3;
                localIOException3.printStackTrace();
              }
              localIOException2 = localIOException2;
              localIOException2.printStackTrace();
            }
            catch (IOException localIOException1)
            {
              while (true)
              {
                localIOException1.printStackTrace();
                continue;
                label906: LiveShutter.WifiApState = LiveShutter.access$31();
                if (LiveShutter.WifiApState == 3)
                {
                  if (LiveShutter.mSH100)
                  {
                    Logger.d("INRY", "runMyControlPoint 3");
                    LiveShutter.this.runMyControlPoint();
                  }
                  LiveShutter.bapsett = false;
                  continue;
                }
                if (LiveShutter.WifiApState == 4)
                {
                  if (LiveShutter.this.nAPFailedCnt >= 15)
                  {
                    LiveShutter.nDisplayFlag = 33;
                    LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
                    LiveShutter.bapsett = false;
                    continue;
                  }
                  if (LiveShutter.netConfig != null)
                    LiveShutter.access$35(LiveShutter.netConfig, false);
                  while (true)
                  {
                    LiveShutter.this.nAPEnablingCnt = 0;
                    LiveShutter localLiveShutter4 = LiveShutter.this;
                    localLiveShutter4.nAPFailedCnt = (1 + localLiveShutter4.nAPFailedCnt);
                    break;
                    LiveShutter.access$36(true);
                  }
                }
                if (LiveShutter.WifiApState == 2)
                {
                  LiveShutter localLiveShutter3 = LiveShutter.this;
                  localLiveShutter3.nAPEnablingCnt = (1 + localLiveShutter3.nAPEnablingCnt);
                  if (LiveShutter.this.nAPEnablingCnt <= 30)
                    continue;
                  LiveShutter.nDisplayFlag = 33;
                  LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
                  LiveShutter.bapsett = false;
                  continue;
                }
                if (LiveShutter.WifiApState != 1)
                  continue;
                LiveShutter.this.nAPEnablingCnt = 0;
                LiveShutter.access$36(true);
                continue;
                label1127: String str = ((ActivityManager.RunningTaskInfo)((ActivityManager)LiveShutter.this.getSystemService("activity")).getRunningTasks(7).get(0)).topActivity.getPackageName();
                Logger.d("myLog", "topactivityname : " + str + " dddd " + LiveShutter.this.totalrunmycontrol);
                LiveShutter localLiveShutter2 = LiveShutter.this;
                localLiveShutter2.totalrunmycontrol = (1 + localLiveShutter2.totalrunmycontrol);
                if ((!str.equals("com.samsung.app")) || (LiveShutter.this.totalrunmycontrol <= 10))
                  continue;
                Logger.e("myLog", "topactivityname : " + str + " dddd " + LiveShutter.this.totalrunmycontrol);
                LiveShutter.wifimanager = (WifiManager)LiveShutter.this.getSystemService("wifi");
                int i = LiveShutter.wifimanager.getWifiState();
                Logger.e("myLog", "nWifistate :" + i);
                if ((i == 2) || (i == 3) || (i == 4))
                  LiveShutter.bOldWifiEnablded = Boolean.valueOf(true);
                Logger.e("myLog", "waitconnectdialog : " + LiveShutter.this.waitconnectdialog);
                Logger.e("myLog", "timetask is run --- 1    SH100 is   " + LiveShutter.mSH100 + " ===== " + LiveShutter.this.totalproaprun);
                if (!LiveShutter.mSH100)
                  continue;
                Logger.d("INRY", "runMyControlPoint 4");
                LiveShutter.this.runMyControlPoint();
              }
            }
          }
        }
      }
    }
  }

  public class WifiStateChangedReceiver extends BroadcastReceiver
  {
    public WifiStateChangedReceiver()
    {
    }

    public void onReceive(Context paramContext, Intent paramIntent)
    {
      switch (LiveShutter.wifimanager.getWifiState())
      {
      case 0:
    	  LiveShutter.bOldWifiEnablded = Boolean.valueOf(true);
    	  break;
      case 1:
      default:
      case 2:
      case 3:
      case 4:
      }
  }

  private class WifiStateChangedReceiverForAppClose extends BroadcastReceiver
  {
    private WifiStateChangedReceiverForAppClose()
    {
    }

    public void onReceive(Context paramContext, Intent paramIntent)
    {
      if (paramIntent.getAction().equals("android.net.wifi.STATE_CHANGE"))
      {
        NetworkInfo.DetailedState localDetailedState = ((NetworkInfo)paramIntent.getParcelableExtra("networkInfo")).getDetailedState();
        if (LiveShutter.mSH100){
            LiveShutter.nDisplayFlag = 10;
            }
            LiveShutter.mHandler.postDelayed(LiveShutter.r, 10L);
            
        switch (localDetailedState.ordinal())
        {
        case 7:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - CONNECTING");
        	break;
        default:
          Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - Unknown");
          break;
        case 3:
        	 Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - OBTAINING_IPADDR");
        	 break;
        case 8:
        	  Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - CONNECTED");
        	  break;
        case 2:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - FAILED");
        	break;
        case 6:
        	 Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - DISCONNECTING");
        	 break;
        case 5:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - DISCONNECTED");
        	break;
        case 4:
        	 Logger.e("myLog", "DISPLAY_NETERRORMSG 15");
        	 break;
        }
      }

    }
  }

  private class WifiStateChangedReceiverForSettingClose extends BroadcastReceiver
  {
    private WifiStateChangedReceiverForSettingClose()
    {
    }

    public void onReceive(Context paramContext, Intent paramIntent)
    {
      if (paramIntent.getAction().equals("android.net.wifi.STATE_CHANGE"))
      {
        NetworkInfo.DetailedState localDetailedState = ((NetworkInfo)paramIntent.getParcelableExtra("networkInfo")).getDetailedState();
        switch (localDetailedState.ordinal())
        {
        case 2:
        	if (LiveShutter.this.isConnectCamAP())
            {
              LiveShutter.this.finishActivity(101);
              break;
            }
        }
      }
    }
  }

  private class WifiStateDebuggerReceiver extends BroadcastReceiver
  {
    private WifiStateDebuggerReceiver()
    {
    }

    public void onReceive(Context paramContext, Intent paramIntent)
    {
      if (paramIntent.getAction().equals("android.net.wifi.STATE_CHANGE"))
      {
          WifiManager localWifiManager = (WifiManager)LiveShutter.this.getSystemService("wifi");
          Logger.d("INRY", "WifiManager.WIFI_STATE_CHANGED_ACTION - " + localWifiManager.getWifiState());
        NetworkInfo.DetailedState localDetailedState = ((NetworkInfo)paramIntent.getParcelableExtra("networkInfo")).getDetailedState();
        switch (localDetailedState.ordinal())
        {
        case 7:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - CONNECTING");
        	break;
        
        case 3:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - OBTAINING_IPADDR");
        	break;
        case 8:
        	 String str = WifiUtils.intToIp(((WifiManager)LiveShutter.this.getSystemService("wifi")).getConnectionInfo().getIpAddress());
             Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - CONNECTED s=" + str);
             break;
        case 2:
        	Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - FAILED");
        	break;
        case 6:
        	 Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - DISCONNECTING");
        	 break;
        case 5:
        	 Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - DISCONNECTED");
        	 break;
        case 4:
        default:
            Logger.d("INRY", "WifiManager.NETWORK_STATE_CHANGED_ACTION - Unknown");
        }
      }
      
      else if (!"android.net.wifi.WIFI_AP_STATE_CHANGED".equals(paramIntent.getAction())){
      	int i = paramIntent.getIntExtra("wifi_state", -1);
      	Logger.d("INRY", "WIFI_AP_STATE_CHANGED - " + i);
      }
    }
  }
  

